Created
September 23, 2008 00:18
-
-
Save lukesutton/12185 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.logger.info("Compiling routes...") | |
Merb::Router.prepare do | |
# Administration | |
match('/admin').to(:namespace => "admin") do | |
resources :locations | |
resources :users | |
resources :links | |
match("/offer").to(:controller => "offer") do | |
match(:method => "get").to(:action => "show").name(:offer) | |
match("/edit", :method => "get").to(:action => "edit").name(:edit_offer) | |
match(:method => "post").to(:action => "update") | |
end | |
slice(:MerbAuth) | |
end | |
# Redirect from admin root to locations | |
match("/admin").redirect("/admin/locations") | |
# Public resources | |
match(%r{\/data\/hotspots(\.:format)?$}).to(:controller => "public/locations", :action => "index") | |
match('/tightarse', :method => :post).to(:controller => "public/contact", :action => "tightarse") | |
match('/contact_us', :method => :post).to(:controller => "public/contact", :action => "contact_us") | |
match('/campaigns/:image').to(:controller => "public/campaigns", :action => "show") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment