Style
This commit is contained in:
parent
2e692f7ea5
commit
01086813af
37 changed files with 221 additions and 190 deletions
|
|
@ -13,8 +13,9 @@ module Admin
|
|||
|
||||
if @registration_period.save
|
||||
Mailbot.delay.conference_registration_date_update_mail(@conference) if send_mail_on_reg_update
|
||||
redirect_to admin_conference_registration_period_path(@conference.short_title),
|
||||
notice: 'Registration Period successfully updated.'
|
||||
|
||||
flash[:notice] = 'Registration Period successfully updated.'
|
||||
redirect_to admin_conference_registration_period_path(@conference.short_title)
|
||||
else
|
||||
flash[:error] = "An error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
|
|
@ -33,19 +34,21 @@ module Admin
|
|||
|
||||
if @registration_period.update(registration_period)
|
||||
Mailbot.delay.conference_registration_date_update_mail(@conference) if send_mail_on_reg_update
|
||||
redirect_to admin_conference_registration_period_path(@conference.short_title),
|
||||
notice: 'Registration Period successfully updated.'
|
||||
|
||||
flash[:notice] = 'Registration Period successfully updated.'
|
||||
redirect_to admin_conference_registration_period_path(@conference.short_title)
|
||||
else
|
||||
flash[:error] = 'An error prohibited the Registration Period from being saved: ' \
|
||||
"#{@registration_period.errors.full_messages.join('. ')}."
|
||||
"#{@registration_period.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@registration_period.destroy
|
||||
redirect_to admin_conference_registration_period_path,
|
||||
notice: 'Registration Period was successfully destroyed.'
|
||||
|
||||
flash[:notice] = 'Registration Period was successfully destroyed.'
|
||||
redirect_to admin_conference_registration_period_path
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue