Guest User

Untitled

a guest
Feb 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. # --- Both would work ---
  2. Merb::Router.prepare do
  3.  
  4. match("/hello") do |h|
  5. h.to(:controller => "hellos")
  6. end
  7.  
  8. end
  9.  
  10. Merb::Router.prepare do
  11.  
  12. match("/hello")
  13. to(:controller => "hellos")
  14. end
  15.  
  16. end
  17.  
  18. # --- Not yielding the first behavior object anymore ---
  19.  
  20. # --- Old:
  21.  
  22. Merb::Router.prepare do |r| # <-- Old
  23.  
  24. r.match("/hello") do |h|
  25. h.to(:controller => "hellos")
  26. end
  27.  
  28. end
Add Comment
Please, Sign In to add comment