Posted By

harrikauhanen on 07/20/10


Tagged


Versions (?)

Displaying routes in Rails console


 / Published in: Rails
 

  1. # this is the Rails 2 way
  2. script/console
  3. include ActionController::UrlWriter
  4. users_path
  5. user_path(123)
  6.  
  7. # this is the Rails 3 equivalent
  8. rails console
  9. include Rails.application.routes.url_helpers
  10. users_path
  11. user_path(123)

Report this snippet  

You need to login to post a comment.