# After Filter Runs Even When Chain Is Halted

**URL:** <https://www.ruby-forum.com/t/after-filter-runs-even-when-chain-is-halted/120710>\
**Category:** Rails\
**Created:** [November 20, 2007, 1:02am UTC](https://www.ruby-forum.com/t/after-filter-runs-even-when-chain-is-halted/120710 "2007-11-20T01:02:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_Lesperance](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/71c47a/32.png) [@Ian\_Lesperance](https://www.ruby-forum.com/u/Ian_Lesperance)\
**Post date:** [November 20, 2007, 1:02am UTC](https://www.ruby-forum.com/t/after-filter-runs-even-when-chain-is-halted/120710/1 "2007-11-20T01:02:55Z")

</div>

For a particular set of actions, I have a before and an after filter.  
When the before filter returns false, however, the after filter still  
executes (which I can tell because an error is being thrown from it.)  
I know the before filter successfully returns false, because the logs  
show that the chain was halted.

What could be causing the after filter to run despite the halting of  
the chain in the before filter?

(This is on Rails 1.2.3, and none of the plug-ins I’m using appear to  
modify the filter functionality of ActionController in any way.)

Thanks in advance for any insight you can provide.

Ian

---

<div class="post-metadata">

**Author:** ![Ian\_Lesperance](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/71c47a/32.png) [@Ian\_Lesperance](https://www.ruby-forum.com/u/Ian_Lesperance)\
**Post date:** [November 20, 2007, 5:09am UTC](https://www.ruby-forum.com/t/after-filter-runs-even-when-chain-is-halted/120710/2 "2007-11-20T05:09:30Z")

</div>

On 20 Nov 2007, at 00:01, Ian Lesperance wrote:

> (This is on Rails 1.2.3, and none of the plug-ins I’m using appear to  
> modify the filter functionality of ActionController in any way.)
> 
> Thanks in advance for any insight you can provide.

This bit me a while back. IIRC, this is just the way things are.

Fred

---

<div class="post-metadata">

**Author:** ![Ian\_Lesperance](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/71c47a/32.png) [@Ian\_Lesperance](https://www.ruby-forum.com/u/Ian_Lesperance)\
**Post date:** [November 21, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/after-filter-runs-even-when-chain-is-halted/120710/3 "2007-11-21T23:21:56Z")

</div>

A-ha. Looks like this was fixed for Rails 1.2.4 with Revision 7177.

Ian

On Nov 19, 8:08 pm, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
