yodeler 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yodeler/listens_to_yodeler.rb +10 -4
- data/lib/yodeler/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: 06e064301271a695f1c1baab2e9782cf110b96c7
|
4
|
+
data.tar.gz: 984d5f2e668ba6c9cb0d6d9c1f9b552f466749a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6aef4f8961ac466b8e9b5076044957aba76c363164137dfe8328c7eeff2815dbd4da3304d4d9b900734a58c22441804cb448e879efb38d7bd8b08df796a2ac3
|
7
|
+
data.tar.gz: 02b71afb307c719d8522e430c077f0d520deabd5c767ef4e6961adec53f13f9e1fad94120adf3e9f29256204d1ac742bf69778ccaedf4ae0a866f5ada2e52506
|
@@ -6,13 +6,19 @@ module Yodeler
|
|
6
6
|
end
|
7
7
|
|
8
8
|
module ClassMethods
|
9
|
-
def listens_to_yodeler(subscriptions_assocation_name = :yodeler_subscriptions)
|
9
|
+
def listens_to_yodeler(subscriptions_assocation_name = :yodeler_subscriptions, notifications_association_name = :yodeler_notifications)
|
10
10
|
cattr_accessor :yodeler_subscriptions_name
|
11
|
+
cattr_accessor :yodeler_notifications_name
|
11
12
|
self.yodeler_subscriptions_name = subscriptions_assocation_name
|
13
|
+
self.yodeler_notifications_name = notifications_association_name
|
12
14
|
|
13
|
-
has_many self.yodeler_subscriptions_name,
|
14
|
-
dependent: :destroy,
|
15
|
-
class_name: "Yodeler::Subscription",
|
15
|
+
has_many self.yodeler_subscriptions_name,
|
16
|
+
dependent: :destroy,
|
17
|
+
class_name: "Yodeler::Subscription",
|
18
|
+
foreign_key: :subscriber_id
|
19
|
+
|
20
|
+
has_many self.yodeler_notifications_name,
|
21
|
+
through: self.yodeler_subscriptions_name,
|
16
22
|
foreign_key: :subscriber_id
|
17
23
|
|
18
24
|
include Yodeler::ListensToYodeler::LocalInstanceMethods
|
data/lib/yodeler/version.rb
CHANGED