-
-
Save carllerche/12946 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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