Module: I18n::Backend::ActiveRecord::StoreProcs

Extended by:
TranslationModel
Defined in:
lib/i18n/backend/active_record/store_procs.rb

Instance Method Summary collapse

Instance Method Details

#value=(val) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/i18n/backend/active_record/store_procs.rb', line 28

def value=(val)
  case val
  when Proc
    write_attribute(:value, val.to_ruby)
    write_attribute(:is_proc, true)
  else
    write_attribute(:value, val)
  end
end