Is there a way to list on a web page the current controller actions define din the controller? Would like to put up a link for each automatically. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On May 19, 2010, at 1:35 PM, Me wrote:> > Is there a way to list on a web page the current controller actions > define din the controller? Would like to put up a link for each > automatically.>> PagesController.instance_methods(false)=> ["destroy", "contact", "list", "show", "expire_all", "edit", "method_missing"]>>You may need to edit down the list just a bit, as you can see. I implemented a few methods in this class (like method_missing) that should be actions that might not be appropriate in a list. Good luck. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Cool forgot about the (false). Any way to get the respond_to formats also On Wed, May 19, 2010 at 15:55, steve ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On May 19, 2010, at 1:35 PM, Me wrote: > > > > Is there a way to list on a web page the current controller actions > > define din the controller? Would like to put up a link for each > > automatically. > > > >> PagesController.instance_methods(false) > => ["destroy", "contact", "list", "show", "expire_all", "edit", > "method_missing"] > >> > > > You may need to edit down the list just a bit, as you can see. I > implemented a few methods in this class (like method_missing) that should be > actions that might not be appropriate in a list. > > Good luck. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On May 19, 2010, at 2:01 PM, Chris Habgood wrote:> Cool forgot about the (false). Any way to get the respond_to formats also > > On Wed, May 19, 2010 at 15:55, steve ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On May 19, 2010, at 1:35 PM, Me wrote: > > > > Is there a way to list on a web page the current controller actions > > define din the controller? Would like to put up a link for each > > automatically. > > > >> PagesController.instance_methods(false) > => ["destroy", "contact", "list", "show", "expire_all", "edit", "method_missing"] > >> > > > You may need to edit down the list just a bit, as you can see. I implemented a few methods in this class (like method_missing) that should be actions that might not be appropriate in a list. > > Good luck. >Not sure what the respond_to formats are. Are you referring to whether Rails renders a particular format like XML, etc.? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
ya we have you know action.format set up, I was trying to auto set up links for each type. On Wed, May 19, 2010 at 16:49, steve ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On May 19, 2010, at 2:01 PM, Chris Habgood wrote: > > Cool forgot about the (false). Any way to get the respond_to formats also > > On Wed, May 19, 2010 at 15:55, steve ross <cwdinfo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On May 19, 2010, at 1:35 PM, Me wrote: >> > >> > Is there a way to list on a web page the current controller actions >> > define din the controller? Would like to put up a link for each >> > automatically. >> >> >> >> PagesController.instance_methods(false) >> => ["destroy", "contact", "list", "show", "expire_all", "edit", >> "method_missing"] >> >> >> >> >> You may need to edit down the list just a bit, as you can see. I >> implemented a few methods in this class (like method_missing) that should be >> actions that might not be appropriate in a list. >> >> Good luck. >> >> > Not sure what the respond_to formats are. Are you referring to whether > Rails renders a particular format like XML, etc.? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.