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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72b23fe74f2f352c1c1a65d13611b19bcb18a1fc
4
- data.tar.gz: 01c47e692fc532165083088695b4b3f479353ab9
3
+ metadata.gz: 06e064301271a695f1c1baab2e9782cf110b96c7
4
+ data.tar.gz: 984d5f2e668ba6c9cb0d6d9c1f9b552f466749a2
5
5
  SHA512:
6
- metadata.gz: 4ce6123eefb96a2d5a4a71f54923b99d19dce71840e040b0e8b1a999ea0dd9fa8baabf3e680b1756e238f0f093d0773e66e537564506d74884b32c20e7cc3231
7
- data.tar.gz: 9fcc42a68743b1776e94216667521bfbacd2dc37a1c51c611bcd92102cb0ffaec9852dfba856b41edda9500b3b8c8978c3870ae63d666a0bdb92bc6ad0010e5a
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
@@ -1,3 +1,3 @@
1
1
  module Yodeler
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yodeler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cory O'Daniel