From d44e1f7c243f59815084eae6881da54be56fc47e Mon Sep 17 00:00:00 2001 From: Stella Date: Sun, 30 Nov 2014 15:41:47 +0200 Subject: [PATCH] flash alert to flash error --- app/controllers/admin/call_for_papers_controller.rb | 6 +++--- app/controllers/admin/commercials_controller.rb | 4 ++-- app/controllers/admin/registration_periods_controller.rb | 4 ++-- app/controllers/admin/registrations_controller.rb | 4 ++-- app/controllers/admin/targets_controller.rb | 6 +++--- app/controllers/admin/tickets_controller.rb | 6 +++--- app/controllers/admin/tracks_controller.rb | 6 +++--- app/controllers/commercials_controller.rb | 4 ++-- app/controllers/conference_registrations_controller.rb | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/controllers/admin/call_for_papers_controller.rb b/app/controllers/admin/call_for_papers_controller.rb index 139c1a74..58e0efc6 100644 --- a/app/controllers/admin/call_for_papers_controller.rb +++ b/app/controllers/admin/call_for_papers_controller.rb @@ -18,7 +18,7 @@ module Admin redirect_to admin_conference_call_for_paper_path, notice: 'Call for papers successfully created.' else - flash[:alert] = "Creating the call for papers failed. #{@call_for_paper.errors.full_messages.join('. ')}." + flash[:error] = "Creating the call for papers failed. #{@call_for_paper.errors.full_messages.join('. ')}." render :new end end @@ -37,7 +37,7 @@ module Admin redirect_to(admin_conference_call_for_paper_path(@conference.short_title), notice: 'Call for papers successfully updated.') else - flash[:alert] = "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}." + flash[:error] = "Updating call for papers failed. #{@cfp.errors.to_a.join('. ')}." render :new end end @@ -46,7 +46,7 @@ module Admin if @call_for_paper.destroy redirect_to admin_conference_call_for_paper_path, notice: 'Call for Papers was successfully deleted.' else - redirect_to admin_conference_call_for_paper_path, alert: 'An error prohibited this Call for Papers from being destroyed: '\ + redirect_to admin_conference_call_for_paper_path, error: 'An error prohibited this Call for Papers from being destroyed: '\ "#{@call_for_paper.errors.full_messages.join('. ')}." end end diff --git a/app/controllers/admin/commercials_controller.rb b/app/controllers/admin/commercials_controller.rb index b5deddcb..59bfd459 100644 --- a/app/controllers/admin/commercials_controller.rb +++ b/app/controllers/admin/commercials_controller.rb @@ -22,7 +22,7 @@ module Admin redirect_to admin_conference_commercials_path, 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 @@ -32,7 +32,7 @@ module Admin redirect_to admin_conference_commercials_path, 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 diff --git a/app/controllers/admin/registration_periods_controller.rb b/app/controllers/admin/registration_periods_controller.rb index f8c723e4..935cc443 100644 --- a/app/controllers/admin/registration_periods_controller.rb +++ b/app/controllers/admin/registration_periods_controller.rb @@ -16,7 +16,7 @@ module Admin redirect_to admin_conference_registration_period_path(@conference.short_title), notice: 'Registration Period successfully updated.' else - flash[:alert] = "An error prohibited the Registration Period from being saved: #{@registration_period.errors.full_messages.join('. ')}." + flash[: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[:alert] = 'An error prohibited the Registration Period from being saved: ' \ + flash[:error] = 'An error prohibited the Registration Period from being saved: ' \ "#{@registration_period.errors.full_messages.join('. ')}." render :edit end diff --git a/app/controllers/admin/registrations_controller.rb b/app/controllers/admin/registrations_controller.rb index 55ecdcd5..d92f6f3d 100644 --- a/app/controllers/admin/registrations_controller.rb +++ b/app/controllers/admin/registrations_controller.rb @@ -19,7 +19,7 @@ module Admin redirect_to admin_conference_registrations_path(@conference.short_title), notice: 'Successfully updated registration!' else - flash[:alert] = "An error prohibited the Registration for #{@conference.title}: "\ + flash[:error] = "An error prohibited the Registration for #{@conference.title}: "\ "#{@registration.errors.full_messages.join('. ')}." render :edit end @@ -32,7 +32,7 @@ module Admin notice: "Deleted registration for #{@user.name}!" else redirect_to(admin_conference_registrations_path(@conference.short_title), - alert: 'You must be an admin to delete a registration.') + error: 'You must be an admin to delete a registration.') end end diff --git a/app/controllers/admin/targets_controller.rb b/app/controllers/admin/targets_controller.rb index b069cb76..b0e11520 100644 --- a/app/controllers/admin/targets_controller.rb +++ b/app/controllers/admin/targets_controller.rb @@ -17,7 +17,7 @@ module Admin redirect_to(admin_conference_targets_path(conference_id: @conference.short_title), notice: 'Target successfully created.') else - flash[:alert] = "Creating target failed: #{@target.errors.full_messages.join('. ')}." + flash[:error] = "Creating target failed: #{@target.errors.full_messages.join('. ')}." render :new end end @@ -29,7 +29,7 @@ module Admin redirect_to(admin_conference_targets_path(conference_id: @conference.short_title), notice: 'Target successfully updated.') else - flash[:alert] = "Target update failed: #{@target.errors.full_messages.join('. ')}." + flash[:error] = "Target update failed: #{@target.errors.full_messages.join('. ')}." render :edit end end @@ -40,7 +40,7 @@ module Admin notice: 'Target successfully destroyed.') else redirect_to(admin_conference_targets_path(conference_id: @conference.short_title), - alert: 'Target was successfully destroyed.' \ + error: 'Target was successfully destroyed.' \ "#{@target.errors.full_messages.join('. ')}.") end end diff --git a/app/controllers/admin/tickets_controller.rb b/app/controllers/admin/tickets_controller.rb index 5920b759..de27459a 100644 --- a/app/controllers/admin/tickets_controller.rb +++ b/app/controllers/admin/tickets_controller.rb @@ -17,7 +17,7 @@ module Admin redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title), notice: 'Ticket successfully created.') else - flash[:alert] = "Creating Ticket failed: #{@ticket.errors.full_messages.join('. ')}." + flash[:error] = "Creating Ticket failed: #{@ticket.errors.full_messages.join('. ')}." render :new end end @@ -29,7 +29,7 @@ module Admin redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title), notice: 'Ticket successfully updated.') else - flash[:alert] = "Ticket update failed: #{@ticket.errors.full_messages.join('. ')}." + flash[:error] = "Ticket update failed: #{@ticket.errors.full_messages.join('. ')}." render :edit end end @@ -40,7 +40,7 @@ module Admin notice: 'Ticket successfully destroyed.') else redirect_to(admin_conference_tickets_path(conference_id: @conference.short_title), - alert: 'Ticket was successfully destroyed.' \ + error: 'Ticket was successfully destroyed.' \ "#{@ticket.errors.full_messages.join('. ')}.") end end diff --git a/app/controllers/admin/tracks_controller.rb b/app/controllers/admin/tracks_controller.rb index 797d92cc..13d6870f 100644 --- a/app/controllers/admin/tracks_controller.rb +++ b/app/controllers/admin/tracks_controller.rb @@ -22,7 +22,7 @@ module Admin redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title), notice: 'Track successfully created.') else - flash[:alert] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}." + flash[:error] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}." render :new end end @@ -34,7 +34,7 @@ module Admin redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title), notice: 'Track successfully updated.') else - flash[:alert] = "Track update failed: #{@track.errors.full_messages.join('. ')}." + flash[:error] = "Track update failed: #{@track.errors.full_messages.join('. ')}." render :edit end end @@ -45,7 +45,7 @@ module Admin notice: 'Track successfully deleted.') else redirect_to(admin_conference_tracks_path(conference_id: @conference.short_title), - alert: 'Track couldn\'t be deleted.' \ + error: 'Track couldn\'t be deleted.' \ "#{@track.errors.full_messages.join('. ')}.") end end diff --git a/app/controllers/commercials_controller.rb b/app/controllers/commercials_controller.rb index d107cb9c..e9c886e8 100644 --- a/app/controllers/commercials_controller.rb +++ b/app/controllers/commercials_controller.rb @@ -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 diff --git a/app/controllers/conference_registrations_controller.rb b/app/controllers/conference_registrations_controller.rb index d750d405..20460016 100644 --- a/app/controllers/conference_registrations_controller.rb +++ b/app/controllers/conference_registrations_controller.rb @@ -34,7 +34,7 @@ class ConferenceRegistrationsController < ApplicationController notice: 'You are now registered and will be receiving E-Mail notifications.' end else - flash[:alert] = "An error prohibited the registration for #{@conference.title}: "\ + flash[:error] = "An error prohibited the registration for #{@conference.title}: "\ "#{@registration.errors.full_messages.join('. ')}." render :new end @@ -45,7 +45,7 @@ class ConferenceRegistrationsController < ApplicationController redirect_to conference_conference_registrations_path(@conference.short_title), notice: 'Registration was successfully updated.' else - flash[:alert] = "An error prohibited the registration for #{@conference.title}: "\ + flash[:error] = "An error prohibited the registration for #{@conference.title}: "\ "#{@registration.errors.full_messages.join('. ')}." render :edit end @@ -57,7 +57,7 @@ class ConferenceRegistrationsController < ApplicationController notice: "You are not registered for #{@conference.title} anymore!" else redirect_to root_path, - alert: "An error prohibited deleting the registration for #{@conference.title}: "\ + error: "An error prohibited deleting the registration for #{@conference.title}: "\ "#{@registration.errors.full_messages.join('. ')}." end end