This project is archived and is in readonly mode.

#318 ✓invalid
Stephan Kaag

Problem with model called Filter

Reported by Stephan Kaag | June 3rd, 2008 @ 04:48 PM

In Rails 2.1.0 i discovered a problem with a model called filter.rb which wasn't there at version 2.0.2.

In ./script/console i can instantiate a filter instance. When calling Filter.new in a controller an ArgumentError is being thrown.

ArgumentError (wrong number of arguments (0 for 2)

A Filter.inspect says: "ActionController::Filters::Filter"

Googling for users with this same problem leads me to http://pastie.caboo.se/pastes/20... which seems to have the same cause.

Comments and changes to this ticket

  • George Chatzigeorgiou

    George Chatzigeorgiou June 7th, 2008 @ 04:44 PM

    Hmm, I had the same issue.

    I changed all calls to Filter.find, Filter.new etc with ::Filter.find, ::Filter.new and it worked.

    Is there a better way?

  • josh

    josh June 13th, 2008 @ 07:01 AM

    • State changed from “new” to “invalid”

    Sorry, but Filter is an object in ActionController. You'll have to specify :: when using it in your controllers.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages