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

Version Path
apispree_core-0.0.0 lib/spree_core/ext/active_record.rb
My-Commerce_core-1.1.0 lib/spree_core/ext/active_record.rb
My-Commerce_core-1.0.0 lib/spree_core/ext/active_record.rb
MyCommerceapi-1.0.0 core/lib/spree_core/ext/active_record.rb
MyCommerce-0.0.3 core/lib/spree_core/ext/active_record.rb
rfcommerce_core-0.0.3 lib/spree_core/ext/active_record.rb
spree_core-0.60.6 lib/spree_core/ext/active_record.rb
spree_core-0.60.5 lib/spree_core/ext/active_record.rb
spree_core-0.30.2 lib/spree_core/ext/active_record.rb
spree_core-0.40.4 lib/spree_core/ext/active_record.rb
spree_core-0.50.4 lib/spree_core/ext/active_record.rb
spree_core-0.60.4 lib/spree_core/ext/active_record.rb
spree_core-0.50.3 lib/spree_core/ext/active_record.rb
spree_core-0.60.3 lib/spree_core/ext/active_record.rb
spree_core-0.60.2 lib/spree_core/ext/active_record.rb
spree_core-0.60.1 lib/spree_core/ext/active_record.rb
spree_core-0.60.0 lib/spree_core/ext/active_record.rb
spree_core-0.60.0.RC1 lib/spree_core/ext/active_record.rb
spree_core-0.50.2 lib/spree_core/ext/active_record.rb
spree_core-0.50.1 lib/spree_core/ext/active_record.rb