mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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
|
||||
# * +true+ or +false+
|
||||
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
|
||||
|
||||
def subscribed? conference
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue