method
clone_attribute_value
v4.2.9 -
Show latest stable
- Class:
ActiveRecord::AttributeMethods
clone_attribute_value(reader_method, attribute_name)protected
No documentation available.
# File activerecord/lib/active_record/attribute_methods.rb, line 374
def clone_attribute_value(reader_method, attribute_name) # :nodoc:
value = send(reader_method, attribute_name)
value.duplicable? ? value.clone : value
rescue TypeError, NoMethodError
value
end