Skip to content

Instantly share code, notes, and snippets.

@rbarazi
Created April 11, 2010 15:46
Show Gist options
  • Select an option

  • Save rbarazi/362829 to your computer and use it in GitHub Desktop.

Select an option

Save rbarazi/362829 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 12-11. Updating routes in config/routes.rb
Blog::Application.routes.draw do
root :to => "articles#index"
resources :articles do
member do
post :notify_friend
end
collection do
get :search
end
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