Sha256: 1f18562cc68c7c3b5d8eadec87be146e0557e49425bcdea74f33cd9d67bf48ef
Contents?: true
Size: 496 Bytes
Versions: 62
Compression:
Stored size: 496 Bytes
Contents
module ActiveRecord::Persistence # Update attributes of a record in the database without callbacks, validations etc. def update_attributes_without_callbacks(attributes) self.assign_attributes(attributes, :without_protection => true) 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
62 entries across 62 versions & 2 rubygems