Forum: Ruby on Rails has_many :conditions

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
onurturgay (Guest)
on 2005-11-12 13:49
(Received via mailing list)

Here is my structure

Node has_many :comments
Comment belongs_to :node

If I specify a :conditions for has_many relationship, I can gather
comments using

n = Node.find(xx)

(two queries)

but if I use find(:all, :include=>:comments) then the :conditions is
ignored. All comments belonging to this node is returned. Do I have to
explicitly state :conditions each time I use find? Or am I doing

Thanks in advance
This topic is locked and can not be replied to.