Sha256: 5f830648523107d86797ad9b447ea6f01291fd00b78dcc60628fe3fb58b683d0
Contents?: true
Size: 475 Bytes
Versions: 27
Compression:
Stored size: 475 Bytes
Contents
module ActiveRecord::Persistence # Update attributes of a record in the database without callbacks, validations etc. def update_attributes_without_callbacks(attributes) self.send(:attributes=, attributes, false) self.class.update_all(attributes, { :id => id }) end # Update a single attribute in the database def update_attribute_without_callbacks(name, value) send("#{name}=", value) update_attributes_without_callbacks(name => value) end end
Version data entries
27 entries across 27 versions & 6 rubygems