Skip to content

Instantly share code, notes, and snippets.

@szimek
Created August 15, 2011 13:34
Show Gist options
  • Save szimek/1146758 to your computer and use it in GitHub Desktop.
Save szimek/1146758 to your computer and use it in GitHub Desktop.
Use different root routes when user is signed in/out (http://collectiveidea.com/blog/archives/2011/05/31/user-centric-routing-in-rails-3/)
root :to => "users#dashboard", :constraints => lambda { |r| r.env["warden"].authenticate? }
root :to => "home#index"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment