Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Problem with model called Filter

#318

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.

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

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. George Chatzigeorgiou
    George Chatzigeorgiou

    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?

    June 7th, 2008 @ 04:44 PM

  2. josh
    josh
    • 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.

    June 13th, 2008 @ 07:01 AM