Commit a61defe
Changed files (2)
app
controllers
spec
controllers
app/controllers/logins_controller.rb
@@ -9,7 +9,7 @@ class LoginsController < ApplicationController
def create
if @session = @login_command.run(self)
session[:user_session_id] = @session.id
- redirect_to root_path
+ redirect_to root_path(anchor: '')
else
flash[:error] = I18n.translate(:invalid_credentials)
render :new
spec/controllers/logins_controller_spec.rb
@@ -39,7 +39,7 @@ describe LoginsController do
end
it "redirects to the dashboard" do
- response.should redirect_to(dashboard_path)
+ response.should redirect_to(root_path(anchor: ''))
end
it "creates a new session" do