Class: Translation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Translation
- Defined in:
- lib/i18n/backend/active_record/translation.rb
Instance Method Summary collapse
Instance Method Details
#value ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/i18n/backend/active_record/translation.rb', line 34 def value if proc Kernel.eval read_attribute( :value ) else read_attribute( :value ) end end |
#value=(v) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/i18n/backend/active_record/translation.rb', line 24 def value=(v) case v when Proc write_attribute(:value, v.to_ruby) write_attribute(:proc, true) else write_attribute(:value, v) end end |