acts_as_trackable 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abcff87c3d8646138656b6e6c3cd3a2b77bbaa06220471cab325ce565fc7af96
4
- data.tar.gz: 0fb60a5c6686eb0d3be23957a482184bd9fd801099ce790593c2f40e543a1e72
3
+ metadata.gz: d5bb2629a59e7f11d52350b0bb6bbc994685330a1e047d0263b6f1f7ef6158f1
4
+ data.tar.gz: f99f747270c0954dc5fd635cc1063a38df43d3d07bbd782f85f3d984aaf9673d
5
5
  SHA512:
6
- metadata.gz: 14717aee75f590338e196dd0982f60e44458ff5822280271c546f0040f79a56d7b5251e0ae8b4e5c89992e35e58b2f83c8c0008d64b64755ac8df28f6b42811f
7
- data.tar.gz: befc693a18e30fd2ac1b7e82512d539cd193a99d9c8236706ae87790c1915456e9b7c66c09eaf59d5d820a28e6f9293f833affa5440a124930b1b7205e0c7074
6
+ metadata.gz: 76482ee95e44272d123d88c9a2d99a3d240efe80d677a88ad7d5b1ad2134755c02a3b5b6399a1e40d83bce4318c04fb95c5ee9a8bc0cc13aacf10791ee91cde0
7
+ data.tar.gz: 4312bb8bbde9fbcfdc758e9589fb1af383d00b3d41fe99e0251f9ce11d11fe1417175568842cb25627704dca4630871f87979077327d715d8dcdd129842e47e3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acts_as_trackable (0.3.0)
4
+ acts_as_trackable (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -45,6 +45,18 @@ After that run the following commands:
45
45
  ```ruby
46
46
  acts_as_modifier
47
47
  ```
48
+ - For STI models, set the following attribute to true to save the child class's object type as the parent class's (base_class) object type:
49
+ ```ruby
50
+ class Post < ActiveRecord::Base
51
+ self.inheritance_column = :class_name
52
+
53
+ acts_as_trackable
54
+ end
55
+
56
+ class Comment < Post
57
+ acts_as_trackable fallback_to_base_class: true
58
+ end
59
+ ```
48
60
  - After that, you need to pass the user to the modifier attribute from your controller(or basically anywhere) to your update/create statements as follows(If you don't pass the modifier, track me will simply ignore creating/updating the object activity):
49
61
  ```ruby
50
62
  YourTrackableModel.update(modifier: @current_user)
data/changelog.md CHANGED
@@ -1,4 +1,7 @@
1
1
  # acts_as_trackable Changelog
2
+ ## Version: 0.3.1
3
+ ### Patch
4
+ - Updated README
2
5
  ## Version: 0.3.0
3
6
  ### Patch
4
7
  - Added support to treat STI models as one model
@@ -1,3 +1,3 @@
1
1
  module ActsAsTrackable
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.3.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_trackable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ahmad Keewan