public_activity 3.0.0 → 3.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37a2aa6ff87085d7785379491f35a7ff8a72b7683817ba06606f5c96e641985d
|
4
|
+
data.tar.gz: 628131cc96ae6dc8c871e8ef0a480331f635fddafcd4f162e18dedf9aa89d25d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14419c7a77acd1d7332a1ccde54aa6a563b22b2898e1d8e62c6d569240ed7b3b09adfb36388e35115987f872cb17ad9c78c5723a2f77307527e670c0beea05bd
|
7
|
+
data.tar.gz: 6b020d2ad93e424b727c10565b6b38c0d1073f4e5c79bd8c1162827c11a23b1424160b6de728af27dc03ca2e42186385bf5df5b6fcf802c581567f42d4f2aecf
|
@@ -19,15 +19,16 @@ module PublicActivity
|
|
19
19
|
# end
|
20
20
|
#
|
21
21
|
# In controller:
|
22
|
-
# User.first.
|
22
|
+
# User.first.activities_as_owner
|
23
|
+
# User.first.activities_as_recipient
|
23
24
|
#
|
24
25
|
def activist
|
25
26
|
has_many :activities_as_owner,
|
26
|
-
|
27
|
-
|
27
|
+
class_name: '::PublicActivity::Activity',
|
28
|
+
as: :owner
|
28
29
|
has_many :activities_as_recipient,
|
29
|
-
|
30
|
-
|
30
|
+
class_name: '::PublicActivity::Activity',
|
31
|
+
as: :recipient
|
31
32
|
end
|
32
33
|
end
|
33
34
|
end
|
@@ -36,7 +36,13 @@ module PublicActivity
|
|
36
36
|
# Serialize parameters Hash
|
37
37
|
begin
|
38
38
|
if table_exists?
|
39
|
-
|
39
|
+
unless %i[json jsonb hstore].include?(columns_hash['parameters'].type)
|
40
|
+
if ::ActiveRecord.version.release < Gem::Version.new('7.1')
|
41
|
+
serialize :parameters, Hash
|
42
|
+
else
|
43
|
+
serialize :parameters, coder: YAML, type: Hash
|
44
|
+
end
|
45
|
+
end
|
40
46
|
else
|
41
47
|
warn("[WARN] table #{name} doesn't exist. Skipping PublicActivity::Activity#parameters's serialization")
|
42
48
|
end
|
@@ -9,7 +9,9 @@ module PublicActivity
|
|
9
9
|
# Creates an association for activities where self is the *trackable*
|
10
10
|
# object.
|
11
11
|
def self.extended(base)
|
12
|
-
base.has_many :activities,
|
12
|
+
base.has_many :activities,
|
13
|
+
class_name: '::PublicActivity::Activity',
|
14
|
+
as: :trackable
|
13
15
|
end
|
14
16
|
end
|
15
17
|
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: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juri Hahn
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-02-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: actionpack
|
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
- !ruby/object:Gem::Version
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
|
-
rubygems_version: 3.5.
|
291
|
+
rubygems_version: 3.5.6
|
292
292
|
signing_key:
|
293
293
|
specification_version: 4
|
294
294
|
summary: Easy activity tracking for ActiveRecord models
|