public_activity 1.4.2 → 1.4.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 133186d2fb5149e6b12c499d588cafb173fa840c
|
4
|
+
data.tar.gz: 9dfa82ab740c143daa9d3c833bc15d2c7efd4604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dada05aea04f8bc8f20e9d474317bffff945d38da725c579feb960498bb7c12990ffd81d58b58448c177a7b20f1ac289b294cd5ef322c499ab9b09e5b8db4532
|
7
|
+
data.tar.gz: b0d35c25b9f8834fbb6f0fa9f6b3cde6936e3fdeba387b8c3eb2c595fc0ae886dce19e786a862588f2f3008117f75c0044dbdef17055b9d9dc088f12f2e5c043
|
@@ -9,10 +9,12 @@ module PublicActivity
|
|
9
9
|
|
10
10
|
# Define polymorphic association to the parent
|
11
11
|
belongs_to :trackable, :polymorphic => true
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
with_options(::ActiveRecord::VERSION::MAJOR >= 5 ? { :required => false } : { }) do
|
13
|
+
# Define ownership to a resource responsible for this activity
|
14
|
+
belongs_to :owner, :polymorphic => true
|
15
|
+
# Define ownership to a resource targeted by this activity
|
16
|
+
belongs_to :recipient, :polymorphic => true
|
17
|
+
end
|
16
18
|
# Serialize parameters Hash
|
17
19
|
serialize :parameters, Hash
|
18
20
|
|
@@ -26,7 +26,12 @@ module PublicActivity
|
|
26
26
|
extend ActiveSupport::Concern
|
27
27
|
|
28
28
|
included do
|
29
|
-
|
29
|
+
# use :before_action instead of deprecated before_filter
|
30
|
+
if respond_to? :before_action
|
31
|
+
before_action :store_controller_for_public_activity
|
32
|
+
else
|
33
|
+
before_filter :store_controller_for_public_activity
|
34
|
+
end
|
30
35
|
end
|
31
36
|
|
32
37
|
# Before filter executed to remember current controller
|
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: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotrek Okoński
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
version: '0'
|
256
256
|
requirements: []
|
257
257
|
rubyforge_project:
|
258
|
-
rubygems_version: 2.
|
258
|
+
rubygems_version: 2.4.8
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: Easy activity tracking for ActiveRecord models
|