我创建了我的模型 whitch 是 Test,当我在浏览器中使用它时一切正常,但是当我尝试从 rails c 对它做一些事情时,我得到了错误。
1.9.3p125 :001 > t=Test.find(4)
NoMethodError: undefined method `find' for Test:Module
from (irb):1
from /home/dorijan/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in `start'
from /home/dorijan/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in `start'
from /home/dorijan/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.3/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
那么有没有办法暂时禁用这个?我知道我不应该使用它,但现在为时已晚......:(谢谢