Guest User

Untitled

a guest
May 26th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. # Merb::Router is the request routing mapper for the merb framework.
  2. Merb.logger.info("Compiling routes...")
  3. Merb::Router.prepare do
  4. #match(:subdomain => ":subdomain").to(:controller => "users", :action => "show") do
  5. # match("/").to(:controller => "users", :action => "show")
  6. #end
  7.  
  8. # Resource routes (maps HTTP verbs to controller actions automatically):
  9. resources :users
  10.  
  11. defer_to do |request,params|
  12. { :controller => 'users', :action => 'show', :short_title => request.subdomains[0]}
  13. end
  14.  
  15. # This is the default route for /:controller/:action/:id
  16. # This is fine for most cases. If you're heavily using resource-based
  17. # routes, you may want to comment/remove this line to prevent
  18. # clients from calling your create or destroy actions with a GET
  19. # default_routes
  20.  
  21. # Change this for your home page to be available at /
  22. match("/").to(:controller => "users", :action => "show")
  23. end
Add Comment
Please, Sign In to add comment