In my Rails 2.3.2 app
I have 2 models:
class Post
has_many :approved_comments, :class_name => 'Comment', :conditions => ['approved => ?', true]
end
class Comment
belongs_to :post
end
For some reason when I try to eager load my comments, I get an error
post = Post.find(:first, :conditions => ["permalink=?", permalink], :include => :approved_comments
undefined method `loaded?' for #
Coming from association_preload.rb line 228
Is this a known issue, or am I doing something wrong or unsupported?
I seem to find a little discussion about this at: http://groups.google.com/group/maine-ruby-users-group/browse_thread/thread/796cf58b62f9bc52