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:incall_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:inbefore_action’

Thanks
Chris

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs