diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 4cb5be489..948e5d02d 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -25,7 +25,7 @@ class RegistrationsController < Devise::RegistrationsController def check_registrations_open! if APP_CONFIG[:registrations_closed] flash[:error] = t('registrations.closed') - redirect_to root_url + redirect_to new_user_session_path end end end diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 4881eb796..9f8e5299a 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -27,12 +27,12 @@ describe RegistrationsController do it 'stops a #new request' do get :new flash[:error].should == I18n.t('registrations.closed') - response.should redirect_to root_url + response.should redirect_to new_user_session_path end it 'stops a #create request' do post :create, @valid_params flash[:error].should == I18n.t('registrations.closed') - response.should redirect_to root_url + response.should redirect_to new_user_session_path end end