Displaying 1 result from an estimated 1 matches for "ranavi".
Did you mean:
banavi
2008 Jun 06
1
Eager loading association with condition
Hi,
To explain my problem, I''ll use the standard Post/author example.
Suppose I have
class Post < ActiveRecord::Base
belongs_to :author
end
I am using following to fetch the posts and author info in a single
query -
for post in Post.find(:all, :include => :author)
...
Now, I want to get *only* the posts whose author''s name starts with
"A". How do I do