Is there a tool or code fragment tat can be used with irb via
scripts/console to test toutes/
Sort of
    Prompt for input
    responds with the route
Thanks
-- 
"Hello, my name is Inigo Montoya, you killed my father, prepare to
die."
  The Princess Bride,
  William Goldman
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On 12/14/07, Anton J Aylward <aja-XdPx9462FWc@public.gmane.org> wrote:> > Is there a tool or code fragment tat can be used with irb via > scripts/console to test toutes/ > > Sort of > Prompt for input > responds with the route > > ThanksOne way is to start an inner irb session on ActionController::Routing::Routes $ script/console Loading development environment (Rails 2.0.1)>> irb ActionController::Routing::Routes >> recognize_path("/")=> {:controller=>"people", :action=>"index"}>> recognize_path("/login")=> {:controller=>"session", :action=>"new"}>> generate(:controller=>"people", :action => "index")=> "/people" This should work with Rails 1.2.x as well as Rails 2.0.x Rails 2.0.x also has a rake task to list the routes: $rake routes -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---