Forum: Ruby on Rails Telling whether action was performed from after/around _filt

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
153868096910b6bca47e2a9212c2df56?d=identicon&s=25 Frederick Cheung (fcheung)
on 2007-04-16 13:02

We currently have a filter (we've tried both after and around filters)
that logs that the user has performed certain actions.

We'd like to be able to tell from the around_filter whether or not the
action was actually performed: if a before_filter aborted the chain such
that the action wasn't actually performed we don't want to record that
the user did take the action (eg a filter that redirects the user to a
page saying their session has expired).

I've looked around, but I can't find anything which allows us to do
this. Controllers do have a @before_filter_chain_aborted but there isn't
an accessor for that. performed? looks like it might do the trick, but
it just reports whether a render or a redirect have occured (and in
general our problem occurs with filters that redirect the user).

Any idea for this ?

This topic is locked and can not be replied to.