Module: Mobility::Sequel::ModelTranslation

Defined in:
lib/mobility/sequel/model_translation.rb

Overview

Module included in translation class dynamically generated by Backends::Sequel::Table backend.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


10
11
12
# File 'lib/mobility/sequel/model_translation.rb', line 10

def self.included(base)
  base.plugin :validation_helpers
end

Instance Method Details

#validateObject


14
15
16
17
# File 'lib/mobility/sequel/model_translation.rb', line 14

def validate
  super
  validates_presence [:locale]
end