Skip to content

Instantly share code, notes, and snippets.

@fairchild
Created July 27, 2008 07:56
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 fairchild/2759 to your computer and use it in GitHub Desktop.
Save fairchild/2759 to your computer and use it in GitHub Desktop.
Merb.logger.info("Compiling routes...")
Merb::Router.prepare do |r|
# RESTful routes
r.resources :songs
# This is the default route for /:controller/:action/:id
# This is fine for most cases. If you're heavily using resource-based
# routes, you may want to comment/remove this line to prevent
# clients from calling your create or destroy actions with a GET
r.default_routes
# Change this for your home page to be available at /
r.match('/').to(:controller => 'songs', :action =>'index')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment