notifi 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/notifi/notification.rb +4 -4
- data/lib/notifi/subscription.rb +2 -2
- data/lib/notifi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36c38c88ddf2a7b030ecc31fc37a5ff4c97369be
|
4
|
+
data.tar.gz: 34312130fbf15d15d43785641ffbb8e5521b9aba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f4778900576c6454425c9f212865833ab531672ddd32fde268abc5e3157f7d2d4cad0faf206524856815a5f2e76ecd1661d0e7b75c01a23b26ee07d39fffce8
|
7
|
+
data.tar.gz: cf97dc777b4f2e506050c4305e31c7a72625752600cc011c32459308576802ba12a5c61f8a8d50354169365926809ed6c0d7f59d70ccd50c2914b0079ff4d9e1
|
data/lib/notifi/notification.rb
CHANGED
@@ -3,10 +3,10 @@ module Notifi
|
|
3
3
|
include Mongoid::Document
|
4
4
|
include Mongoid::Timestamps
|
5
5
|
|
6
|
-
belongs_to :subscription
|
7
|
-
belongs_to :subscriber, polymorphic: true
|
8
|
-
belongs_to :notifier, polymorphic: true
|
9
|
-
belongs_to :subscribable, polymorphic: true
|
6
|
+
belongs_to :subscription, index: true
|
7
|
+
belongs_to :subscriber, polymorphic: true, index: true
|
8
|
+
belongs_to :notifier, polymorphic: true, index: true
|
9
|
+
belongs_to :subscribable, polymorphic: true, index: true
|
10
10
|
|
11
11
|
field :read, type: Boolean, default: false
|
12
12
|
field :message, type: String
|
data/lib/notifi/subscription.rb
CHANGED
@@ -3,8 +3,8 @@ module Notifi
|
|
3
3
|
include Mongoid::Document
|
4
4
|
include Mongoid::Timestamps
|
5
5
|
|
6
|
-
belongs_to :subscriber, polymorphic: true
|
7
|
-
belongs_to :subscribable, polymorphic: true
|
6
|
+
belongs_to :subscriber, polymorphic: true, index: true
|
7
|
+
belongs_to :subscribable, polymorphic: true, index: true
|
8
8
|
has_many :notifications, dependent: :destroy, inverse_of: :subscription
|
9
9
|
|
10
10
|
def notify(event=:default, notifier: nil, set: {})
|
data/lib/notifi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hunter Haydel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|