How do I make this root path go to: '/dashboard' instead of just http://example.com?
root :to => 'dashboard#index', :constraints => lambda{|req| !req.session[:user_id].blank?}
You can accomplish that with:
root :to => redirect('/dashboard')
match '/dashboard', :to => "dashboard#index",
:constraints => lambda {|req| !req.session[:user_id].blank? }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With