mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 21:24:05 +00:00
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
|
|
@ -15,7 +15,7 @@ module Admin
|
|||
redirect_to admin_conference_campaigns_path(conference_id: @conference.short_title),
|
||||
notice: 'Campaign successfully created.'
|
||||
else
|
||||
flash[:error] = 'Campaign creation failed. ' + @campaign.errors.full_messages.to_sentence
|
||||
flash.now[:error] = 'Campaign creation failed. ' + @campaign.errors.full_messages.to_sentence
|
||||
render action: 'new'
|
||||
end
|
||||
end
|
||||
|
|
@ -29,7 +29,7 @@ module Admin
|
|||
redirect_to admin_conference_campaigns_path(conference_id: @conference.short_title),
|
||||
notice: "Campaign '#{@campaign.name}' successfully updated."
|
||||
else
|
||||
flash[:error] = "Campaign update failed. #{@campaign.errors.full_messages.to_sentence}"
|
||||
flash.now[:error] = "Campaign update failed. #{@campaign.errors.full_messages.to_sentence}"
|
||||
render action: 'edit'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue