attendable 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/attendable/acts_as_attendable.rb +1 -1
- data/lib/attendable/acts_as_invitable.rb +1 -1
- data/lib/attendable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDg1M2EyZTdmMzZjY2I1Yzk3YTU4YjBmZTEwNDQyZWIzNWY3OWI1OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWJhZGFkYjk5NTA0YjA5MDFjZDU3MThkZGEyZWJlOTNjMjQwZDU3OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzY5YWZkMTZiNTcyY2FlZGUxZDRmZjc2MTM3NDNjN2Y3MmY3ZTkwOTRlOTNh
|
10
|
+
MWQ5NGUyYWJkYTcxZmRhODVkMmUzMWZmZDkyYjhmNzI1OTZmNTMyOTJhMjIz
|
11
|
+
NGYyNzEyYTExYTg2MGM4Zjk1MmFlYzFhMWQ2MzBkMjg0NGQyOTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjBlNmU2MDMyYTI5Y2RlZWUxZDJmYzNmZGQ2OGU0OTVjNDBlMTRlZmVjY2Ez
|
14
|
+
MGFjMTFlYzgzY2U0Nzc3YjliZDU5MmMyMTRjYTY1NzlhYmMzZWY3MzUxZGJl
|
15
|
+
ZDlkMDk3MjUxZDkyMGEwNDRhY2VjMTAwM2JlMjUxMTNkMDJlMWM=
|
@@ -15,7 +15,7 @@ module Attendable
|
|
15
15
|
attendee_class_name = options[:by].present? ? options[:by].to_s.classify : "User"
|
16
16
|
table_name = class_name.tableize
|
17
17
|
has_many name, as: :attendable, dependent: :destroy, class_name: class_name
|
18
|
-
has_many :attendees,
|
18
|
+
has_many :attendees, ->{where "#{table_name}.rsvp_status = 'attending'"}, through: name, source: :invitable, source_type: attendee_class_name
|
19
19
|
clazz = class_name.constantize
|
20
20
|
|
21
21
|
# instance methods
|
@@ -16,7 +16,7 @@ module Attendable
|
|
16
16
|
attendable_class_name = options[:to]
|
17
17
|
table_name = class_name.tableize
|
18
18
|
has_many name, as: :invitable, dependent: :destroy, class_name: class_name
|
19
|
-
has_many attendable_class_name.tableize.to_sym,
|
19
|
+
has_many attendable_class_name.tableize.to_sym, ->{where "#{table_name}.rsvp_status = 'attending'"}, through: name, source: :attendable, source_type: attendable_class_name
|
20
20
|
|
21
21
|
clazz = class_name.constantize
|
22
22
|
|
data/lib/attendable/version.rb
CHANGED