Merge pull request #1661 from rahul2240/flash-message

Replace flash with flash.now
This commit is contained in:
Ana María Martínez Gómez 2017-08-29 09:29:07 +02:00 committed by GitHub
commit 9baeaf4f73
3 changed files with 8 additions and 8 deletions

View file

@ -22,7 +22,7 @@ module Admin
redirect_to admin_conference_booths_path,
notice: 'Booth successfully created.'
else
flash[:error] = "Creating booth failed. #{@booth.errors.full_messages.to_sentence}."
flash.now[:error] = "Creating booth failed. #{@booth.errors.full_messages.to_sentence}."
render :new
end
end
@ -40,7 +40,7 @@ module Admin
redirect_to admin_conference_booths_path,
notice: "Successfully updated booth for #{@booth.title}."
else
flash[:error] = "An error prohibited the Booth for #{@booth.title} "\
flash.now[:error] = "An error prohibited the Booth for #{@booth.title} "\
"#{@booth.errors.full_messages.join('. ')}."
render :edit
end

View file

@ -102,7 +102,7 @@ module Admin
ahoy.track 'Event submission', title: 'New submission'
redirect_to admin_conference_program_events_path(@conference.short_title), notice: 'Event 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

View file

@ -23,7 +23,7 @@ class BoothsController < ApplicationController
redirect_to conference_booths_path,
notice: 'Booth successfully created.'
else
flash[:error] = "Creating booth failed. #{@booth.errors.full_messages.to_sentence}."
flash.now[:error] = "Creating booth failed. #{@booth.errors.full_messages.to_sentence}."
render :new
end
end
@ -40,7 +40,7 @@ class BoothsController < ApplicationController
redirect_to conference_booths_path,
notice: 'Booth successfully updated!'
else
flash[:error] = "Booth could not be updated. #{@booth.errors.full_messages.to_sentence}."
flash.now[:error] = "Booth could not be updated. #{@booth.errors.full_messages.to_sentence}."
end
end
@ -56,7 +56,7 @@ class BoothsController < ApplicationController
redirect_to conference_booths_path,
notice: 'Booth successfully withdrawn'
else
flash[:error] = "Booth could not be withdrawn. #{@booth.errors.full_messages.to_sentence}."
flash.now[:error] = "Booth could not be withdrawn. #{@booth.errors.full_messages.to_sentence}."
end
end
@ -70,7 +70,7 @@ class BoothsController < ApplicationController
redirect_to conference_booths_path,
notice: 'Booth successfully confirmed'
else
flash[:error] = "Booth could not be confirmed. #{@booth.errors.full_messages.to_sentence}."
flash.now[:error] = "Booth could not be confirmed. #{@booth.errors.full_messages.to_sentence}."
end
end
@ -84,7 +84,7 @@ class BoothsController < ApplicationController
redirect_to conference_booths_path,
notice: 'Booth successfully re-submitted'
else
flash[:error] = "Booth could not be re-submitted. #{@booth.errors.full_messages.to_sentence}."
flash.now[:error] = "Booth could not be re-submitted. #{@booth.errors.full_messages.to_sentence}."
end
end