Change all redirect_to(path) to redirect path for uniformity

This commit is contained in:
Nishanth Vijayan 2016-03-11 02:08:00 +05:30
parent 434eb90b76
commit 19c54bd935
23 changed files with 128 additions and 125 deletions

View file

@ -35,14 +35,16 @@ module Admin
state = user_params[:state]
unless user
redirect_to(admin_conference_role_path(@conference.short_title, @role.name),
error: 'Could not find user. Please provide a valid email!') && return
redirect_to admin_conference_role_path(@conference.short_title, @role.name),
error: 'Could not find user. Please provide a valid email!'
return
end
# The conference must have at least 1 organizer
if @role.name == 'organizer' && state == 'false' && @role.users.count == 1
redirect_to(admin_conference_role_path(@conference.short_title, @role.name),
error: 'The conference must have at least 1 organizer!') && return
redirect_to admin_conference_role_path(@conference.short_title, @role.name),
error: 'The conference must have at least 1 organizer!'
return
end
# Remove user