flash alert to flash error

This commit is contained in:
Stella 2014-11-30 15:41:47 +02:00
parent 65c0cd7a73
commit d44e1f7c24
9 changed files with 23 additions and 23 deletions

View file

@ -18,7 +18,7 @@ class CommercialsController < ApplicationController
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
notice: 'Commercial was successfully created.'
else
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
render :new
end
end
@ -28,7 +28,7 @@ class CommercialsController < ApplicationController
redirect_to edit_conference_proposal_path(conference_id: @conference.short_title, id: @event.id),
notice: 'Commercial was successfully updated.'
else
flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
flash[:error] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}."
render :edit
end
end