Module: ActiveRecord::AttributeConverter::Base
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/activerecord/attribute_converter/base.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#externalize_attributes ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/activerecord/attribute_converter/base.rb', line 16 def externalize_attributes self.class.attribute_converters.each do |attr, converter| if attributes.has_key?(attr) send("#{attr}=", converter.externalize(send(attr))) end end end |
#internalize_attributes ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/activerecord/attribute_converter/base.rb', line 8 def internalize_attributes self.class.attribute_converters.each do |attr, converter| if attributes.has_key?(attr) send("#{attr}=", converter.internalize(send(attr))) end end end |