Guest User

Untitled

a guest
Feb 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. map.connect '', :controller => 'teasers'
  2.  
  3. map.with_options(:defaults => {:menu_id => 'default_value'}, :requirements => {:menu_id => /\d+/}) do |m|
  4.  
  5. m.connect 'page_category/:id/list/:menu_id', :controller => 'page_categories', :action => 'list_pages'
  6. m.connect 'menu_item/page_category/:id/lis/:menu_id', :controller => 'page_categories', :action => 'list_pages'
  7.  
  8. m.connect 'menu_item/:controller/:action/:id/:menu_id'
  9.  
  10. end
  11.  
  12. #nice map for menu editing
  13. map.connect 'menu/:menu_name/:action/:id', :controller => 'menu_items', :action => 'list_by_name'
  14.  
  15. # Allow downloading Web Service WSDL as a file with an extension
  16. # instead of a file named 'wsdl'
  17. map.connect ':controller/service.wsdl', :action => 'wsdl'
  18.  
  19. # Install the default route as the lowest priority.
  20. map.connect ':controller/:action/:id'
Add Comment
Please, Sign In to add comment