Fernando Perez wrote:
> I solved it by appending the first method to the chain.
> 
> 
> I have another problem:
> 
> I want to chain 2 named_scopes that both have a :joins in their 
> definition. The problem is that the :joins of the second named_scope in 
> the chain doesn't get added to the query. IS that normal behavior?

I solved that problem too, it was again the select(*) that was getting 
in the way.

Now another question: can I chain 2 named_scopes that define the :joins 
option? Is named_scope smart enough to append the two :joins like it 
does for :conditions? I can't make it happen. Only one of the :joins 
finds its way in the final query sent to the DB.
-- 
Posted via http://www.ruby-forum.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
-~----------~----~----~----~------~----~------~--~---

Reply via email to