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.
@@ -140,10 +140,14 @@ module PublicActivity
140
140
  }
141
141
  end
142
142
 
143
- def extract_key(action, options)
144
- (options[:key] ||
145
- self.activity_key ||
146
- ((self.class.name.underscore + "." + action.to_s) if action)).try(:to_s)
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
@@ -1,4 +1,4 @@
1
1
  module PublicActivity
2
2
  # A constant with gem's version
3
- VERSION = '0.5.3'
3
+ VERSION = '0.5.4'
4
4
  end
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.3
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-24 00:00:00.000000000 Z
13
+ date: 2012-12-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord