mongoid_activity_tracker 0.2.2 → 0.2.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: b91662553f642b59840c5fd733fbcae5f3b2bf28
|
4
|
+
data.tar.gz: 98a0b2667979ea41acf595c925fb52ae0b0d0073
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19e08ff77bf23fb19481accd6711d1d17d54ac31bb30367d423cb14e9023eeb38cf42e40c8c387141f39743c798d02c591e935b3962803cb692b1dcc290182d
|
7
|
+
data.tar.gz: bd61c47fbb603c0b22244b37792447c5c608bd8777179d8bbace9bb11ab0cbcb043eaba4d8af38ad5adba0af629b7466637c053f12dd141eefe21defef42cc74
|
@@ -10,6 +10,10 @@ module MongoidActivityTracker
|
|
10
10
|
create({ action: action, actor: actor }.merge(options))
|
11
11
|
end
|
12
12
|
|
13
|
+
def track!(actor, action, options = {})
|
14
|
+
create!({ action: action, actor: actor }.merge(options))
|
15
|
+
end
|
16
|
+
|
13
17
|
# ---------------------------------------------------------------------
|
14
18
|
|
15
19
|
def tracks(relation_name, cache_methods: %i(to_s))
|
@@ -19,7 +23,7 @@ module MongoidActivityTracker
|
|
19
23
|
|
20
24
|
field field_name, type: Hash, default: {}
|
21
25
|
|
22
|
-
belongs_to relation_name, polymorphic: true
|
26
|
+
belongs_to relation_name, polymorphic: true, optional: true
|
23
27
|
|
24
28
|
attr_accessor accessor_name
|
25
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_activity_tracker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|