wupee 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/wupee/notification.rb +3 -0
- data/lib/wupee/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b1e156622b84c44de1ac4f06f7b0206fc136701
|
4
|
+
data.tar.gz: ba081168ac9039d4feef351c802738d5b7bec413
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8352081b6bbf711c4521c63f13977bb72d71548884ae59a38bd5f3966fb99dfd1a0982f92ff953d50f2f0fcc39fbd3e875e9c3fd5bd38dc9183847279a78f167
|
7
|
+
data.tar.gz: 6a05a6cfa4e4afc22f28ecaf3268405da56b69703143fe8b4842ab8b1151e65132c1b24dada715d87576390caf5fc7868a60a1ecd2582dc61744894831ebbd09
|
@@ -6,6 +6,9 @@ class Wupee::Notification < ActiveRecord::Base
|
|
6
6
|
validates_presence_of :receiver,
|
7
7
|
:notification_type
|
8
8
|
|
9
|
+
scope :unread, -> { where(is_read: false) }
|
10
|
+
scope :ordered, -> { order(created_at: :desc) }
|
11
|
+
|
9
12
|
def mark_as_read
|
10
13
|
update_columns(is_read: true)
|
11
14
|
end
|
data/lib/wupee/version.rb
CHANGED