Method: ActiveRecord::Wrappings::AbstractWrapper#save_wrapped_attribute
- Defined in:
- lib/active_record/wrappings.rb
#save_wrapped_attribute(record) ⇒ Object Also known as: before_save
:nodoc:
27 28 29 30 31 32 33 34 35 |
# File 'lib/active_record/wrappings.rb', line 27 def save_wrapped_attribute(record) #:nodoc: if record.attribute_present?(@attribute) record.send( "write_attribute", @attribute, wrap(record.send("read_attribute", @attribute)) ) end end |