rubyonrails-talk
August 31st, 2006, 06:02 AM
It appears that with_scope does not apply to eager loaded models
e.g.
Comments.with_scope(:find => {:conditions => ['comments.private =
?',private]}) do
Post.find id,:include=>:comments
end
Will not take into account the scoped condition on comments.
Is this the expected behavior or a bug?
More... (http://groups.google.com/group/rubyonrails-talk/msg/f295d0568cc982d0)
e.g.
Comments.with_scope(:find => {:conditions => ['comments.private =
?',private]}) do
Post.find id,:include=>:comments
end
Will not take into account the scoped condition on comments.
Is this the expected behavior or a bug?
More... (http://groups.google.com/group/rubyonrails-talk/msg/f295d0568cc982d0)