instance method
attributes_for_update
Ruby on Rails 6.1.7.10
Since v4.0.13 PrivateSignature
attributes_for_update(attribute_names)
Filters the primary keys and readonly attributes from the attribute names.
Parameters
-
attribute_namesreq
Source
# File activerecord/lib/active_record/attribute_methods.rb, line 394
def attributes_for_update(attribute_names)
attribute_names &= self.class.column_names
attribute_names.delete_if do |name|
self.class.readonly_attribute?(name)
end
end
Defined in activerecord/lib/active_record/attribute_methods.rb line 394
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods