Ball, Donald A Jr \(Library\)
2007-Jan-31 17:00 UTC
how to determine controller and action from filter
Hi all. I''ve got an authentication before_filter in application.rb that has a couple of special cases which depend on the controller and action to which the request is routed. How can I access those data from inside the filter method? - donald --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You mean like... params[''action''] params[''controller''] ? /ak Ball, Donald A Jr (Library) schrieb:> Hi all. I''ve got an authentication before_filter in application.rb that > has a couple of special cases which depend on the controller and action > to which the request is routed. How can I access those data from inside > the filter method? > > - donald > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ball, Donald A Jr \(Library\)
2007-Jan-31 18:19 UTC
Re: how to determine controller and action from filter
> You mean like... > > params[''action''] > > params[''controller'']Dur, that''d work just fine. I was thinking it''d be something like request.action or request.controller. Thanks. - donald --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---