noticed 2.5.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/noticed/readable.rb +16 -8
- data/lib/noticed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04e620f63d7f92b5220c39fa3bb848d8c8905b39a93e8d5c32b7d904f462e694
|
4
|
+
data.tar.gz: 43e89757c72ea2475171a080a2ff0881100e229298bfa63d8b816e17e44aa5cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 444c47faf233395d77b9ccb003a99f8e45768298f27eac35318f36f5f385ee5ca76f91bbd189e92e3bfb7e50f2ffdaec58ea87e42a6f68c6e5d8e4ee6a61baaf
|
7
|
+
data.tar.gz: aeea21827f7eb7071ad482babe06a130a69b27190b15ada99bf3727fa522eb75c4fb8d460d28234f604177a11ae3c34f4a3b6a0c218aebe7d7538577aa1cc465
|
@@ -10,20 +10,28 @@ module Noticed
|
|
10
10
|
end
|
11
11
|
|
12
12
|
class_methods do
|
13
|
-
def
|
14
|
-
update_all(read_at: Time.current, updated_at: Time.current)
|
13
|
+
def mark_as_read_and_seen(**kwargs)
|
14
|
+
update_all(**kwargs.with_defaults(read_at: Time.current, seen_at: Time.current, updated_at: Time.current))
|
15
15
|
end
|
16
16
|
|
17
|
-
def
|
18
|
-
update_all(read_at: nil, updated_at: Time.current)
|
17
|
+
def mark_as_unread_and_unseen(**kwargs)
|
18
|
+
update_all(**kwargs.with_defaults(read_at: nil, seen_at: nil, updated_at: Time.current))
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
22
|
-
update_all(
|
21
|
+
def mark_as_read(**kwargs)
|
22
|
+
update_all(**kwargs.with_defaults(read_at: Time.current, updated_at: Time.current))
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
26
|
-
update_all(
|
25
|
+
def mark_as_unread(**kwargs)
|
26
|
+
update_all(**kwargs.with_defaults(read_at: nil, updated_at: Time.current))
|
27
|
+
end
|
28
|
+
|
29
|
+
def mark_as_seen(**kwargs)
|
30
|
+
update_all(**kwargs.with_defaults(seen_at: Time.current, updated_at: Time.current))
|
31
|
+
end
|
32
|
+
|
33
|
+
def mark_as_unseen(**kwargs)
|
34
|
+
update_all(**kwargs.with_defaults(seen_at: nil, updated_at: Time.current))
|
27
35
|
end
|
28
36
|
end
|
29
37
|
|
data/lib/noticed/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noticed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Oliver
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|