Sha256: 7fa6993daafbd6d0043eea20d2ccbf6955e462cd0b17380417a736b384ca5b34

Contents?: true

Size: 397 Bytes

Versions: 15

Compression:

Stored size: 397 Bytes

Contents

class User < ActiveRecord::Base
  include ArTransactionChanges

  attr_accessor :stored_transaction_changes

  after_commit :store_transaction_changes_for_tests

  def store_transaction_changes_for_tests
    @stored_transaction_changes = transaction_changed_attributes.reduce({}) do |changes, (attr_name, value)|
      changes[attr_name] = [value, send(attr_name)]
      changes
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ar_transaction_changes-1.1.6 test/models/user.rb
ar_transaction_changes-1.1.5 test/models/user.rb
ar_transaction_changes-1.1.4 test/models/user.rb
ar_transaction_changes-1.1.3 test/models/user.rb
ar_transaction_changes-1.1.2 test/models/user.rb
ar_transaction_changes-1.1.1 test/models/user.rb
ar_transaction_changes-1.1.0 test/models/user.rb
ar_transaction_changes-1.0.3 test/models/user.rb
ar_transaction_changes-1.0.2 test/models/user.rb
ar_transaction_changes-1.0.1 test/models/user.rb
ar_transaction_changes-1.0.0 test/models/user.rb
ar_transaction_changes-0.0.4 test/models/user.rb
ar_transaction_changes-0.0.3 test/models/user.rb
ar_transaction_changes-0.0.2 test/models/user.rb
ar_transaction_changes-0.0.1 test/models/user.rb