My application is running over ubuntu 10, ruby 1.9.2, rails 3.0.3 and
passenger 3.0.2 + nginx.
This application has several polymorphic associations and the problem
is that when the associations are called it randomly returns either
the related object or an ActiveRecord::Relation object.
Has anybody had a similar problem or is this a known issue?
Basically the Model looks like this:
class Blahblah < ActiveRecord::Base
belongs_to :data_object, :polymorphic => true
When I call data_object.id, sometimes I'll get the following error:
"undefined method 'id' for ActiveRecord::Relation"
other times, the association works fine
If I try this in a rails console it seems to always work (could be
because of the inspect the console does).
Basically the issue always occurs when the app is running on nginx or
Any help will be appreciated.