mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +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
|
|
@ -40,7 +40,7 @@ class ProposalsController < ApplicationController
|
|||
if @user.save
|
||||
sign_in(@user)
|
||||
else
|
||||
flash[:error] = "Could not save user: #{@user.errors.full_messages.join(', ')}"
|
||||
flash.now[:error] = "Could not save user: #{@user.errors.full_messages.join(', ')}"
|
||||
render action: 'new'
|
||||
return
|
||||
end
|
||||
|
|
@ -57,7 +57,7 @@ class ProposalsController < ApplicationController
|
|||
ahoy.track 'Event submission', title: 'New submission'
|
||||
redirect_to conference_program_proposals_path(@conference.short_title), notice: 'Proposal was successfully submitted.'
|
||||
else
|
||||
flash[:error] = "Could not submit proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
flash.now[:error] = "Could not submit proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
render action: 'new'
|
||||
end
|
||||
end
|
||||
|
|
@ -69,7 +69,7 @@ class ProposalsController < ApplicationController
|
|||
redirect_to conference_program_proposals_path(conference_id: @conference.short_title),
|
||||
notice: 'Proposal was successfully updated.'
|
||||
else
|
||||
flash[:error] = "Could not update proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
flash.now[:error] = "Could not update proposal: #{@event.errors.full_messages.join(', ')}"
|
||||
render action: 'edit'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue