notifications 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20160328045436_create_notifications.rb +1 -1
- data/lib/notifications/model.rb +15 -6
- data/lib/notifications/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11ede6b9c4999b3fcd16cd1b416ec02495e69ed62f47cc1f129d86f790b89535
|
4
|
+
data.tar.gz: 63d585ba260dea8f79369779fc5f288f1e2fcff9af827646aee1c83c7608f993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85a919e22548ae611bbf54b2bb61b8e2f1831ea2226e97950797d7b6dbc74689633d0da71dcdfa25df16870772d11a994df76fdd30c8a002912b480951c74d2b
|
7
|
+
data.tar.gz: 3328313f4fb47bc3805d93b5fb5f9dd7fc3ad8fad0ece1141128474729e0cad2ac6aeafcaf102edbcf9351be819d603bce4f9f580c22866aa892a5067790ab3a
|
data/lib/notifications/model.rb
CHANGED
@@ -5,12 +5,21 @@ module Notifications
|
|
5
5
|
DEFAULT_AVATAR = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAMAAAAJixmgAAAAFVBMVEWkpKSnp6eqqqq3t7fS0tLV1dXZ2dmshcKEAAAAtklEQVR4Ae3XsRGAAAjAQFRk/5HtqaTz5H+DlInvAQAAAAAAAAAAAAAAAAAAAACymiveO6o7BQsWLFiwYMGCBS8PFixYsGDBggULFixYsGDBggULFixYsGDBggULFixYsGDBc4IFCxYsWLBgwYIFC14ZfOeAPRQ8IliwYMGCBQsWLFiwYMGCBQsWLFiwYMGCBQsWLFiwYMGCBQsWLFiwYMGCBQv+JQAAAAAAAAAAAAAAAAAAAOAB4KJfdHmj+kwAAAAASUVORK5CYII='
|
6
6
|
|
7
7
|
included do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
if Rails.version.start_with? "4"
|
9
|
+
belongs_to :actor, class_name: Notifications.config.user_class
|
10
|
+
belongs_to :user, class_name: Notifications.config.user_class
|
11
|
+
|
12
|
+
belongs_to :target, polymorphic: true
|
13
|
+
belongs_to :second_target, polymorphic: true
|
14
|
+
belongs_to :third_target, polymorphic: true
|
15
|
+
else
|
16
|
+
belongs_to :actor, class_name: Notifications.config.user_class, optional: true
|
17
|
+
belongs_to :user, class_name: Notifications.config.user_class
|
18
|
+
|
19
|
+
belongs_to :target, polymorphic: true, optional: true
|
20
|
+
belongs_to :second_target, polymorphic: true, optional: true
|
21
|
+
belongs_to :third_target, polymorphic: true, optional: true
|
22
|
+
end
|
14
23
|
|
15
24
|
scope :unread, -> { where(read_at: nil) }
|
16
25
|
end
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 4.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|