Skip to content

Instantly share code, notes, and snippets.

@carllerche
Forked from piclez/gist:12058
Created September 25, 2008 21:28
Show Gist options
  • Save carllerche/12946 to your computer and use it in GitHub Desktop.
Save carllerche/12946 to your computer and use it in GitHub Desktop.
Merb::Router.prepare do |r|
#Merbauth routes is broken (capture is depricated)
slice(:MerbAuth, :path => "", :default_routes => false)
# 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 => 'welcome', :action =>'index')
# AIR
with :controller => 'galleries' do
match('/galleries.xml', :method => 'get').to(:action =>'get_user_galleries', :format => "xml")
end
identify User => :login do
match("/:login") do
resources :galleries
match(:method => "get").to(:controller => "dashboard").name(:user)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment