From 46aed52c851fa3763cb6b9bb6efa83df29eb3dd8 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Wed, 3 Sep 2014 00:18:45 +0300 Subject: [PATCH] commercials --- app/controllers/admin/commercials_controller.rb | 4 ++-- app/controllers/commercials_controller.rb | 4 ++-- spec/features/commercials_spec.rb | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/controllers/admin/commercials_controller.rb b/app/controllers/admin/commercials_controller.rb index 2a41b2dc..b5deddcb 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] = "A error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." + flash[:alert] = "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] = "A error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." + flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." render :edit end end diff --git a/app/controllers/commercials_controller.rb b/app/controllers/commercials_controller.rb index 38bd2eb7..d107cb9c 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] = "A error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." + flash[:alert] = "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] = "A error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." + flash[:alert] = "An error prohibited this Commercial from being saved: #{@commercial.errors.full_messages.join('. ')}." render :edit end end diff --git a/spec/features/commercials_spec.rb b/spec/features/commercials_spec.rb index 249bc28f..9c77b771 100644 --- a/spec/features/commercials_spec.rb +++ b/spec/features/commercials_spec.rb @@ -20,7 +20,7 @@ feature Commercial do select('SlideShare', from: 'commercial_commercial_type') click_button 'Create Commercial' - expect(flash).to eq("A error prohibited this Commercial from being saved: Commercial can't be blank.") + expect(flash).to eq("An error prohibited this Commercial from being saved: Commercial can't be blank.") expect(conference.commercials.count).to eq(expected_count - 1) # Create valid commercial @@ -39,7 +39,7 @@ feature Commercial do fill_in 'commercial_commercial_id', with: '' click_button 'Update Commercial' - expect(flash).to eq("A error prohibited this Commercial from being saved: Commercial can't be blank.") + expect(flash).to eq("An error prohibited this Commercial from being saved: Commercial can't be blank.") expect(conference.commercials.count).to eq(expected_count) # Update valid commercial @@ -97,7 +97,7 @@ feature Commercial do select('SlideShare', from: 'commercial_commercial_type') click_button 'Create Commercial' - expect(flash).to eq("A error prohibited this Commercial from being saved: Commercial can't be blank.") + expect(flash).to eq("An error prohibited this Commercial from being saved: Commercial can't be blank.") expect(event.commercials.count).to eq(@expected_count - 1) end @@ -125,7 +125,7 @@ feature Commercial do select('SlideShare', from: 'commercial_commercial_type') fill_in 'commercial_commercial_id', with: '' click_button 'Update Commercial' - expect(flash).to eq("A error prohibited this Commercial from being saved: Commercial can't be blank.") + expect(flash).to eq("An error prohibited this Commercial from being saved: Commercial can't be blank.") expect(event.commercials.count).to eq(@expected_count) end