Skip to content

Instantly share code, notes, and snippets.

@benschwarz
Created October 12, 2008 05:24
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 benschwarz/16363 to your computer and use it in GitHub Desktop.
Save benschwarz/16363 to your computer and use it in GitHub Desktop.
Merb.logger.info("Compiling routes...")
Merb::Router.prepare do |r|
# RESTful routes
# resources :posts
resources :newsletters do
member :subscribe, :method => :post
member :unsubscribe, :method => :delete
end
# 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
default_routes
# Change this for your home page to be available at /
# match('/').to(:controller => 'whatever', :action =>'index')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment