Guest User

Untitled

a guest
Feb 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1.  
  2. Merb::Prepare do
  3.  
  4. namespace do |admin|
  5. resources :users
  6. end
  7.  
  8. resources :articles do
  9. resources :comments
  10. end
  11.  
  12. resources :users do
  13. resources :comments
  14. resources :blogs do
  15. resources :comments
  16. end
  17. end
  18.  
  19. match("/dashboard").to(:controller => "zomg", :action => "hi2u")
  20.  
  21. end
  22.  
  23. # Request Resource Controller#action
  24. # --------------------------------------------------------------------------------
  25. # /users/1 => Resource(:show, @user) => Users#show
  26. # /users/1/edit => Resource(:edit, @user) => Users#edit
  27. # /admin/users/1 => Resource(:admin_show, @user) => Admin::Users#show
  28. # /users/1/comments/1 => Resource(:show, @user, @comment) => Comments#show
  29.  
  30. # /dashboard => Resource(:show, @dashboard) => Zomg#hi2u
  31. #
  32. # @dashboard is an instance of a custom object to handle routes that don't map 1-1 with
  33. # an instance of an ORM class
Add Comment
Please, Sign In to add comment