Skip to content

Instantly share code, notes, and snippets.

@marksim
Created May 27, 2011 21:20
Show Gist options
  • Save marksim/996202 to your computer and use it in GitHub Desktop.
Save marksim/996202 to your computer and use it in GitHub Desktop.
Example restful Routes file in Rails 3
My::Application.routes.draw do
resources :contacts
resources :requests do
get 'pending', :on => :collection
put 'approve', :on => :member
put 'deny', :on => :member
end
resource :profile, :only => [:show, :update]
resources :relationships, :only => [:update]
devise_for :users
root :to => "contacts#index"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment