use flash.now instead of flash where page is rendered in the same controller methods
This commit is contained in:
parent
d90d2344d6
commit
b7bdb29cbe
23 changed files with 39 additions and 39 deletions
|
|
@ -16,7 +16,7 @@ module Admin
|
|||
redirect_to admin_conference_registration_period_path(@conference.short_title),
|
||||
notice: 'Registration Period successfully updated.'
|
||||
else
|
||||
flash[:error] = "An error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}."
|
||||
flash.now[:error] = "An error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
@ -36,7 +36,7 @@ module Admin
|
|||
redirect_to admin_conference_registration_period_path(@conference.short_title),
|
||||
notice: 'Registration Period successfully updated.'
|
||||
else
|
||||
flash[:error] = 'An error prohibited the Registration Period from being saved: ' \
|
||||
flash.now[:error] = 'An error prohibited the Registration Period from being saved: ' \
|
||||
"#{@registration_period.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue