Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Created March 20, 2010 21:12
Show Gist options
  • Save rbarazi/338912 to your computer and use it in GitHub Desktop.
Save rbarazi/338912 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 7-17. Adding session to routes.rb in config/routes.rb
Blog::Application.routes.draw do
root :to => "articles#index"
resources :articles do
resources :comments
end
resources :users
resource :session
match '/login' => "sessions#new", :as => "login"
match '/logout' => "sessions#destroy", :as => "logout"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment