Forum: Ruby on Rails Problems with association named :task

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jason G. (Guest)
on 2006-03-13 18:48
I have an object that belongs_to :task, and calling that object's task
method returns the task it belongs to in the unit tests.  One place in a
controller, though, it gives me the error:
undefined method `find' for Rake::Task:Class
#{RAILS_ROOT}/app/controllers/account_controller.rb:80:in `login'

and simultaneously in the log I get:
WARNING: Deprecated reference to top-level constant 'Task'found at:
    Use --classic-namespace on rake command
    or 'require "rake/classic_namespace"' in Rakefile

I've even tried specifying
belongs_to :task, :class_name => "ActiveRecord::Task", :foreign_key =>
and still no luck.  Any suggestions?

I'm on Edge Rails.

This topic is locked and can not be replied to.