Before_filter question

Let’s say I’m using before_filter in my controller:

before_filter :setup

def setup
# do something here
end

Is there any way my setup method can know which action is really about
to be called? Let’s say I want to log out which action is going to be
called, how can I know that in the before_filter method? (My question
is not really about logging, that’s just an example).

Thanks!
Jeff

On 10 Mar 2006 16:30:58 -0000, Jeff C.
[email protected] wrote:

called, how can I know that in the before_filter method? (My question
is not really about logging, that’s just an example).

logger.debug(“ACTION=” + action_name)

You can find the docs for this here: http://api.rubyonrails.org/

Click on “ActionController::Base”. Scroll down to Attributes.

– James

You can find the docs for this here: http://api.rubyonrails.org/

Click on “ActionController::Base”. Scroll down to Attributes.

Thanks James. Sorry I missed that.

Jeff

On 10 Mar 2006 17:07:33 -0000, Jeff C.
[email protected] wrote:

You can find the docs for this here: http://api.rubyonrails.org/

Click on “ActionController::Base”. Scroll down to Attributes.

Thanks James. Sorry I missed that.

No need to apologize. I was just pointing out the docs, because
there’s a lot of other useful attributes in there too.

– James