Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsthamm committed Feb 3, 2017
1 parent 947a3d6 commit 38f12c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/events_controller.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/profiles_controller.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/events_controller_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 38f12c0

Please sign in to comment.