Skip to content

Instantly share code, notes, and snippets.

@johnivanoff
Created March 18, 2012 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnivanoff/2081866 to your computer and use it in GitHub Desktop.
Save johnivanoff/2081866 to your computer and use it in GitHub Desktop.
International::Application.routes.draw do
scope '(:locale)' do
match 'locations/' => 'locations#index', :as => :locations, :via => [:get]
match "locations" => 'locations#create', :via => [:post]
match 'locations/new' => 'locations#new', :as => :new_location
match 'locations/:id/edit' => 'locations#edit', :as => :edit_location
match "locations/(:id)" => 'locations#show', :as => :location, :via => [:get]
match "locations/(:id)" => 'locations#update', :via => [:put]
match "locations/(:id)" => 'locations#destroy', :via => [:delete]
root :to => 'locations#index'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment