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

Version Path
spree_core-2.0.13 lib/spree/core/ext/active_record.rb
spree_core-2.0.12 lib/spree/core/ext/active_record.rb
spree_core-2.0.11 lib/spree/core/ext/active_record.rb
spree_core-2.0.10 lib/spree/core/ext/active_record.rb
spree_core-2.0.9 lib/spree/core/ext/active_record.rb
spree_core-1.3.5 lib/spree/core/ext/active_record.rb
spree_core-2.0.8 lib/spree/core/ext/active_record.rb
spree_core-2.0.7 lib/spree/core/ext/active_record.rb
spree_core-2.0.6 lib/spree/core/ext/active_record.rb
spree_core-1.3.4 lib/spree/core/ext/active_record.rb
spree_core-2.0.5 lib/spree/core/ext/active_record.rb
spree_core-2.0.4 lib/spree/core/ext/active_record.rb
spree_core-2.0.3 lib/spree/core/ext/active_record.rb
spree_core-1.3.3 lib/spree/core/ext/active_record.rb
spree_core-1.2.5 lib/spree/core/ext/active_record.rb
spree_core-2.0.2 lib/spree/core/ext/active_record.rb
spree_core-2.0.1 lib/spree/core/ext/active_record.rb
spree_core-2.0.0 lib/spree/core/ext/active_record.rb
spree_core-2.0.0.rc1 lib/spree/core/ext/active_record.rb
spree_core-1.1.6 lib/spree/core/ext/active_record.rb