hi there, how do you list all the possible named routes for your nested resources is there a way to do this from console??? cheers dion --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
just found the Routing Navigator plugin http://blog.caboo.se/articles/2006/06/19/new-plugin-routing-navigator this sounds promising... On 5/28/07, Dion Hewson <dionhewson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > hi there, > > how do you list all the possible named routes for your nested resources > > is there a way to do this from console??? > > cheers > > > dion--~--~---------~--~----~------------~-------~--~----~ 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 May 27, 2007, at 11:00 PM, Dion Hewson wrote:> just found the Routing Navigator plugin > > http://blog.caboo.se/articles/2006/06/19/new-plugin-routing-navigator > > this sounds promising... >I find the routing plugin to be extremely helpful. If you still want to find them from the console, keep in mind that methods for the routes get attached to your controller. This allows you to do this: $ ./script/console >> a = ApplicationController.new >> a.methods.sort.select {|m| m =~ /url$/ } You can play with the regexp in the select block to filter to exactly what you''re looking for, but trying it should be illustrative. Thanks, David> > On 5/28/07, Dion Hewson <dionhewson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> >> hi there, >> >> how do you list all the possible named routes for your nested >> resources >> >> is there a way to do this from console??? >> >> cheers >> >> >> dion >> > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hey David thats pretty hand a.methods.sort.select {|m| m =~ /path$/ } never thought of parsing regexps through console output cheers On 5/28/07, David Altenburg <gensym-ee4meeAH724@public.gmane.org> wrote:> > > On May 27, 2007, at 11:00 PM, Dion Hewson wrote: > > > > just found the Routing Navigator plugin > > > > http://blog.caboo.se/articles/2006/06/19/new-plugin-routing-navigator > > > > this sounds promising... > > > > I find the routing plugin to be extremely helpful. > If you still want to find them from the console, keep in mind that > methods for the routes get attached to your controller. > > This allows you to do this: > > $ ./script/console > >> a = ApplicationController.new > >> a.methods.sort.select {|m| m =~ /url$/ } > > You can play with the regexp in the select block to filter to exactly > what you''re looking for, but trying it should be illustrative. > > Thanks, > > David > > > > > > On 5/28/07, Dion Hewson <dionhewson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> > >> hi there, > >> > >> how do you list all the possible named routes for your nested > >> resources > >> > >> is there a way to do this from console??? > >> > >> cheers > >> > >> > >> dion > >> > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---