attendable 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDliNWI0NzEyOWRlNGE4ZTQzMGIxZDYyYTJjNTkzZWRmYjVkMzdlMw==
4
+ ZDg1M2EyZTdmMzZjY2I1Yzk3YTU4YjBmZTEwNDQyZWIzNWY3OWI1OQ==
5
5
  data.tar.gz: !binary |-
6
- ZDg5MWNiYzhlMTlmNzVkYjM1NDY3ZmIwNTlkMTRlYmQzODg1NjI1Ng==
6
+ NWJhZGFkYjk5NTA0YjA5MDFjZDU3MThkZGEyZWJlOTNjMjQwZDU3OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDAzODcxNmIwMTgxM2U4MjA4ZjdhZDZjM2Y2MWQ4ZGIyOTZjN2JhNTg1ZDJm
10
- Mjc5MGFmNTIxOTdjOTc4MTkyYTRhNTMyZDExNjI5YjIyOThkM2Y0NzQ2MDQ3
11
- NzU0YjVkNmE3NGRkZWU3YmI5MTBlNTNlY2I0MzhhNDNhYWYyZmM=
9
+ YzY5YWZkMTZiNTcyY2FlZGUxZDRmZjc2MTM3NDNjN2Y3MmY3ZTkwOTRlOTNh
10
+ MWQ5NGUyYWJkYTcxZmRhODVkMmUzMWZmZDkyYjhmNzI1OTZmNTMyOTJhMjIz
11
+ NGYyNzEyYTExYTg2MGM4Zjk1MmFlYzFhMWQ2MzBkMjg0NGQyOTc=
12
12
  data.tar.gz: !binary |-
13
- Y2UwNGI3ZTM5NjkyMDhmZWJhZjljNjg3YTcwMmRkMjA0NjdlNGYyNDcxZWFi
14
- ZTZhYTEwMjlmMDQ1NjVjOWQ1MTZkNGFlMjNjNDc0YzQwMDc4NzBlZDNlODA3
15
- YTJkMWQ0ZjM0ZWU2YjQzZjIwMjhmZDIxNmI2OGU1MDVkZWViYTg=
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, conditions: "#{table_name}.rsvp_status = 'attending'", through: name, source: :invitable, source_type: attendee_class_name
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, conditions: "#{table_name}.rsvp_status = 'attending'", through: name, source: :attendable, source_type: attendable_class_name
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
 
@@ -1,3 +1,3 @@
1
1
  module Attendable
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attendable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Nowrotek