From 38f12c03860483bea2f6ce980fa5d0fa29c930e4 Mon Sep 17 00:00:00 2001 From: Nils Thamm Date: Fri, 3 Feb 2017 13:26:57 +0100 Subject: [PATCH] Minor refactoring --- app/controllers/events_controller.rb | 2 +- app/controllers/profiles_controller.rb | 2 +- spec/controllers/events_controller_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index b5afbbcb..ed8a9546 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -22,7 +22,7 @@ def archive # GET /events/1 def show if @event.hidden and !can? :view_hidden, Event - redirect_to new_application_letter_path(:event_id => @event.id, :hidden => true) + redirect_to new_application_letter_path(:event_id => @event.id) end @free_places = @event.compute_free_places @occupied_places = @event.compute_occupied_places diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 7a4db68e..43375783 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -31,7 +31,7 @@ def create if @profile.save if flash[:event_id] - redirect_to new_application_letter_path(:event_id => flash[:event_id],:hidden => flash[:hidden]), notice: I18n.t('profiles.successful_creation') + redirect_to new_application_letter_path(:event_id => flash[:event_id]), notice: I18n.t('profiles.successful_creation') else redirect_to edit_user_registration_path, notice: I18n.t('profiles.successful_creation') end diff --git a/spec/controllers/events_controller_spec.rb b/spec/controllers/events_controller_spec.rb index 793dbef3..6a79aaf7 100644 --- a/spec/controllers/events_controller_spec.rb +++ b/spec/controllers/events_controller_spec.rb @@ -172,7 +172,7 @@ sign_in @user get :show, id: @event.to_param, session: valid_session - expect(response).to redirect_to(new_application_letter_path(:event_id => @event.id, :hidden => true)) + expect(response).to redirect_to(new_application_letter_path(:event_id => @event.id)) end describe "GET #participants_pdf" do