Fix bug in User#registered_to_event?
Fix exception being thrown in `User#registered_to_event?` when the user is not registered in the corresponding event conference.
This commit is contained in:
parent
c2866a1810
commit
e5aa6ab868
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ class User < ActiveRecord::Base
|
||||||
# ====Returns
|
# ====Returns
|
||||||
# * +true+ or +false+
|
# * +true+ or +false+
|
||||||
def registered_to_event? event
|
def registered_to_event? event
|
||||||
event.registrations.pluck(:id).include? self.registrations.find_by(conference_id: event.program.conference.id).id
|
event.registrations.include? registrations.find_by(conference: event.program.conference)
|
||||||
end
|
end
|
||||||
|
|
||||||
def subscribed? conference
|
def subscribed? conference
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue