[EMAIL PROTECTED] wrote:
> Hi,
>
> I ve defined the following relation in one of my models with a dynamic
> where condition:
> has_one :selection,
> :foreign_key => 'object_id',
> :conditions => 'selection_type = 1 and account_id = #
> {self.send(:account_id)}'
>
> That works perfect, however when I try to eager load that relation I
> am getting the following error when doing a count. Seems that self is
> not really my model class anymore.... Does anybody know how I can get
> that up and running?
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/7f7f715d917b9faa/426c768dd282929f
But be careful if and when you use Rails in multi-threaded mode.
--
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---