Hi,
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
end

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
apache.

Any help will be appreciated.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to