public_activity 0.5.3 → 0.5.4
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.
- data/lib/public_activity/common.rb +8 -4
- data/lib/public_activity/version.rb +1 -1
- metadata +2 -2
@@ -140,10 +140,14 @@ module PublicActivity
|
|
140
140
|
}
|
141
141
|
end
|
142
142
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
143
|
+
# Helper method to serialize class name into relevant key
|
144
|
+
# @return [String] the resulted key
|
145
|
+
# @param [Symbol] or [String] the name of the operation to be done on class
|
146
|
+
# @param [Hash] options to be used on key generation, defaults to {}
|
147
|
+
def extract_key(action, options = {})
|
148
|
+
(options[:key] || self.activity_key ||
|
149
|
+
((self.class.name.underscore.gsub('/', '_') + "." + action.to_s) if action)
|
150
|
+
).try(:to_s)
|
147
151
|
end
|
148
152
|
|
149
153
|
# Resets all instance options on the object
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: public_activity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-12-
|
13
|
+
date: 2012-12-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|