Module: ZLocalize::Translatable::LocalizedDecimalAttributes::ClassMethods
- Defined in:
- lib/zlocalize/rails/decimal_attributes.rb
Instance Method Summary collapse
Instance Method Details
#localize_decimal_attributes(column_names) ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/zlocalize/rails/decimal_attributes.rb', line 47 def localize_decimal_attributes(column_names) [column_names].flatten.each do |col_name| class_eval "def #{col_name}=(value) write_localized_decimal_attribute('#{col_name}',value) end" end include ZLocalize::Translatable::LocalizedDecimalAttributes::InstanceMethods end |