Guest User

Untitled

a guest
Apr 16th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. ## the routing...
  2. r.match('/admin').to(:namespace => 'admin') do |a|
  3. a.resources :users
  4. a.resources :widgets
  5. a.resources :gadgets
  6. a.resource :session
  7.  
  8. a.match('/some_misc_thing_for_admins').to(:controller => 'something', :action => 'else')
  9. end
  10.  
  11. ## the results...
  12. /admin/some_misc_things_for_admins results in Admin::Something#else being dispatched
  13. /admin/users, /admin/widgets, admin/gadgets, admin/session, result in merb raising Merb::ControllerExceptions::BadRequest
Add Comment
Please, Sign In to add comment