# Filters On Models

**URL:** <https://www.ruby-forum.com/t/filters-on-models/129696>\
**Category:** Rails\
**Created:** [February 20, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/filters-on-models/129696 "2008-02-20T19:52:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 20, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/filters-on-models/129696/1 "2008-02-20T19:52:57Z")

</div>

Can I put an after style filter on a method that is part of a model that  
is  
not a create, update, destroy? 🙂

–  
John K.  
removed\_email\_address@domain.invalid

Blog: [http://www.kopanas.com](http://www.kopanas.com)  
Conference: [http://www.cusec.net](http://www.cusec.net)  
Twits: [http://www.twitter.com/kopanas](http://www.twitter.com/kopanas)

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 21, 2008, 1:55pm UTC](https://www.ruby-forum.com/t/filters-on-models/129696/2 "2008-02-21T13:55:39Z")

</div>

Yes, you can apply a filter to any (public) action. Don’t forget that  
if you want to restrict it to your new action then you can use  
the :only param as well…

after\_filter :clean\_up\_on\_aisle\_five, :only=\>:aisle\_five
