Style
This commit is contained in:
parent
2e692f7ea5
commit
01086813af
37 changed files with 221 additions and 190 deletions
|
|
@ -69,8 +69,9 @@ module Admin
|
|||
@conference.save
|
||||
# user that creates the conference becomes organizer of that conference
|
||||
current_user.add_role :organizer, @conference
|
||||
redirect_to(admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Conference was successfully created.')
|
||||
|
||||
flash[:notice] = 'Conference was successfully created.'
|
||||
redirect_to admin_conference_path(id: @conference.short_title)
|
||||
else
|
||||
render action: 'new'
|
||||
end
|
||||
|
|
@ -84,12 +85,13 @@ module Admin
|
|||
|
||||
if @conference.update_attributes(params[:conference])
|
||||
Mailbot.delay.conference_date_update_mail(@conference) if send_mail_on_conf_update
|
||||
redirect_to(edit_admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Conference was successfully updated.')
|
||||
|
||||
flash[:notice] = 'Conference was successfully updated.'
|
||||
redirect_to edit_admin_conference_path(id: @conference.short_title)
|
||||
else
|
||||
redirect_to(edit_admin_conference_path(id: short_title),
|
||||
alert: 'Updating conference failed. ' \
|
||||
"#{@conference.errors.full_messages.join('. ')}.")
|
||||
flash[:error] = 'Updating conference failed. ' \
|
||||
"#{@conference.errors.full_messages.join('. ')}."
|
||||
redirect_to edit_admin_conference_path(id: short_title)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue