Commit a61defe

mo khan <mo@mokhan.ca>
2014-04-12 03:41:30
redirect to root_path with anchor.
1 parent 15ea1d0
Changed files (2)
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