Skip to content

Instantly share code, notes, and snippets.

@lazyatom
Created May 1, 2009 14:34
Show Gist options
  • Save lazyatom/105069 to your computer and use it in GitHub Desktop.
Save lazyatom/105069 to your computer and use it in GitHub Desktop.
# Some bloggish site that has a default route to display pages at
# SEO-friendly URLs, like /here-is-my-new-blog-post
ActionController::Routing::Routes.draw do |map|
map.resources :sections
# because this route matches everything, the plugin routes will never be hit.
map.connect "/:name", :controller => "pages", :action => "show"
end
# A plugin doing auth-type stuff
ActionController::Routing::Routes.draw do |map|
map.login "/login", :controller => "session", :action => "new"
map.logout "/logout" # ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment