Fix assignment with if

This commit is contained in:
Hernan Schmidt 2017-07-12 17:05:48 +02:00
parent 9b362db98e
commit 60569d5ec0
5 changed files with 31 additions and 31 deletions

View file

@ -13,11 +13,11 @@ module Admin
def show
if can_manage_volunteers?(@conference)
if @conference.use_vpositions
@volunteers = @conference.registrations.joins(:vchoices).uniq
else
@volunteers = @conference.registrations.where(volunteer: true)
end
@volunteers = if @conference.use_vpositions
@conference.registrations.joins(:vchoices).uniq
else
@conference.registrations.where(volunteer: true)
end
else
authorize! :index, :volunteer
end