Chris
2006-Aug-03 13:11 UTC
[Rails] strange before_filter error. is this a bug i have found?
...
before_filter :find_regression_test
def find_regression_test
@regression_test=RegressionTest.find(8)
end
....
The above seems like perfectly normal before_filter syntax, but it gives
this error. Aldo is no application trace, just a framework trace:
Any idea what is wrong?
NoMethodError in Regression testsController#modify_regression_test
private method `equal?'' called for false:FalseClass
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:1567:in
`==''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:411:in
`call_filters''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:394:in
`call_filters''
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:383:in
`before_action''
......
Thanks
Chris
--
Posted via http://www.ruby-forum.com/.
linux user
2006-Aug-03 17:04 UTC
[Rails] strange before_filter error. is this a bug i have found?
I don''t know what is the name of your controller but if its a Rails reserved name you may have a conflict. try redefine find_regression_test method (and or controller) with some other name Most likely this should fix the problem -daya On 8/3/06, Chris <cadams1342@hotmail.com> wrote:> > ... > before_filter :find_regression_test > > def find_regression_test > @regression_test=RegressionTest.find(8) > end > .... > > The above seems like perfectly normal before_filter syntax, but it gives > this error. Aldo is no application trace, just a framework trace: > Any idea what is wrong? > > NoMethodError in Regression testsController#modify_regression_test > > private method `equal?'' called for false:FalseClass > > RAILS_ROOT: script/../config/.. > Application Trace | Framework Trace | Full Trace > > /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2 > /lib/active_record/base.rb:1567:in > `=='' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1 > /lib/action_controller/filters.rb:411:in > `call_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1 > /lib/action_controller/filters.rb:394:in > `call_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1 > /lib/action_controller/filters.rb:383:in > `before_action'' > ...... > > > Thanks > Chris > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060803/e685da24/attachment.html