Skip to content

Instantly share code, notes, and snippets.

@jayfallon
Created July 7, 2010 03:52
Show Gist options
  • Save jayfallon/466276 to your computer and use it in GitHub Desktop.
Save jayfallon/466276 to your computer and use it in GitHub Desktop.
Static pages routes and controller
map.root :controller => "pages"
map.home ':page', :controller => 'pages', :action => 'show', :page => /index|contact/
class PagesController < ApplicationController
def home
#render the landing page
end
def contact
end
def show
render :action => params[:page]
end
end
@jayfallon
Copy link
Author

link_to 'About', home_path('about')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment