Commit 5224262

mo khan <mo@mokhan.ca>
2014-04-11 02:22:00
redirect to root path on login.
1 parent baf7aab
Changed files (2)
app
config
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 dashboard_path
+      redirect_to root_path
     else
       flash[:error] = I18n.translate(:invalid_credentials)
       render :new
config/routes.rb
@@ -1,7 +1,7 @@
 Mocode::Application.routes.draw do
   resources :logins, only: [:new, :create]
   get 'dashboard', to: 'dashboard#index'
-  root 'logins#new'
+  root 'dashboard#index'
   # The priority is based upon order of creation: first created -> highest priority.
   # See how all your routes lay out with "rake routes".