I\'m using rails 2.3.5 and ruby 1.8.7. I\'m building a simple TODO manager. Where I have tasks that belong to a user and a user has many tasks.
I\'m using act
Maybe there is something wrong with associations in model. Can you paste some code from there?
You can also try doing the same in console. Does it give the same error? Take a look in logs, do both of your examples generates the same sql query?
Got it.
From here,
Some of the classes inherited or included in your engine controllers may fail to get unloaded and cause trouble after the first request to your system.
For me, it was because I had a file in the lib
that was monkey patching User model and the
User model class in this file was not getting cached I suppose.
Calling unloadable
in that class in the lib folder did the trick. So my lib file looks like this
class User < ActiveRecord::Base
unloadable
# stuff...
end
Thanks anyways.