Skip to content

Instantly share code, notes, and snippets.

@reagent
Created June 16, 2009 17:21
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 reagent/130780 to your computer and use it in GitHub Desktop.
Save reagent/130780 to your computer and use it in GitHub Desktop.
ActionController::Routing::Routes.draw do |map|
map.resources :users, :only => [:show]
map.page 'page/*permalink', :controller => 'pages', :action => 'show'
end
<!-- app/views/pages/show.html.erb -->
hi, I am a page with a slug: <%= params[:permalink].join('/') %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment