transaction_changes 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87555349d944f68fc8675579a3749f97809cb2ca2695bc44073c094183edc40f
4
- data.tar.gz: e45fa2e5cd31fcc251cadebe1e2a5598fa467ac16f5fd67026a4275a46b7ea63
3
+ metadata.gz: 909f2c5f55116fa8163c6c648079c662f86daead68b2154fefe7ffe273c61813
4
+ data.tar.gz: 364f496076c303016a1adb568b1ab84e9ffc5c4442c0cb84e7ccb03935755b68
5
5
  SHA512:
6
- metadata.gz: 4696e4dcbc58633d5a8de757cfacf0d3bbf1ef6aaa8e4351396d7e44d7355716879b206bfa21009f52becaefa9165ac6d45ff8e4f5e4072a38690fb56be7940d
7
- data.tar.gz: 52da1cca331d9097e26e95dd75c2c3eaea5fa4b87c337c55346e4d7cf928663536d832ac61a38db3238ef0e9e27973fb75f3c2e0bee7fd245e9260c39fc4cb4c
6
+ metadata.gz: 6a66bc5796ca60e6218a31495a2a4d347ee24d3af801ace209a19bf61d21f241321b638ebca3d8593414fa4788b6548c75ea3137f22a4d516975ccc20b454823
7
+ data.tar.gz: 5f8ef2f50ef0155d19c6ea9ccd7b1cf478464c87a379ecd58d713d8660b1fef7199b9b0736e2f81cc9762a37a396357040ad2164f4b4244d93566df8d4a44f43
data/README.md CHANGED
@@ -33,10 +33,6 @@ class Profile < ActiveRecord::Base
33
33
  end
34
34
  ```
35
35
 
36
- ## Important Notes
37
-
38
- `include TransactionChanges` should be written after all the after_commit callbacks
39
-
40
36
  ## Development
41
37
 
42
38
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,3 +1,3 @@
1
1
  module TransactionChanges
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.2"
3
3
  end
@@ -29,10 +29,13 @@ module TransactionChanges
29
29
 
30
30
  def accumulate_changes
31
31
  @new_transaction_changes ||= HashWithIndifferentAccess.new
32
- attribute_changes = ::ActiveRecord.version.to_s.to_f >= 5.1 ? self.saved_changes : self.changes
32
+
33
+ attribute_changes = ::ActiveRecord.respond_to?(:version) && ActiveRecord.version.to_s.to_f >= 5.1 ? self.saved_changes : self.changes
33
34
  attribute_changes.each do |key, value|
34
35
  @new_transaction_changes[key] = value
35
36
  end
36
37
  end
37
38
 
38
39
  end
40
+
41
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transaction_changes
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Priyanka