# How to overcome ActionController::Filters::Filter?

**URL:** <https://www.ruby-forum.com/t/how-to-overcome-actioncontroller-filter/155877>\
**Category:** Rails\
**Created:** [December 17, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/how-to-overcome-actioncontroller-filter/155877 "2008-12-17T21:24:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/77aa72/32.png) [@vivek](https://www.ruby-forum.com/u/vivek)\
**Post date:** [December 17, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/how-to-overcome-actioncontroller-filter/155877/1 "2008-12-17T21:24:04Z")

</div>

I had a model called filter defined in an ancient version of rails  
(about 1 yr old). Now I upgrade to 2.2.2 and see that all my  
references to Filter resolve to  
ActionController::Filters::Filter and that gives all kinds of errors  
because ruby tries to search for the model methods in the  
ActionController filter module…  
Is there a way to fix this without changing my code?

---

<div class="post-metadata">

**Author:** ![vivek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/77aa72/32.png) [@vivek](https://www.ruby-forum.com/u/vivek)\
**Post date:** [December 17, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/how-to-overcome-actioncontroller-filter/155877/2 "2008-12-17T21:24:41Z")

</div>

On 17 Dec 2008, at 20:04, Vivek wrote:

> I had a model called filter defined in an ancient version of rails  
> (about 1 yr old). Now I upgrade to 2.2.2 and see that all my  
> references to Filter resolve to  
> ActionController::Filters::Filter and that gives all kinds of errors  
> because ruby tries to search for the model methods in the  
> ActionController filter module…  
> Is there a way to fix this without changing my code?

In your controllers write ::Filter instead of Filter.

Fred
