# Telling whether action was performed from after/around \_filt

**URL:** <https://www.ruby-forum.com/t/telling-whether-action-was-performed-from-after-around-filt/92124>\
**Category:** Rails\
**Created:** [April 16, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/telling-whether-action-was-performed-from-after-around-filt/92124 "2007-04-16T13:02:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcheung](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/90db22/32.png) [@fcheung](https://www.ruby-forum.com/u/fcheung)\
**Post date:** [April 16, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/telling-whether-action-was-performed-from-after-around-filt/92124/1 "2007-04-16T13:02:01Z")

</div>

Hi,

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 ?

Fred
