When a new feature is implemented in rails, people will tend to use
it, believing it's the rails way to do things, without digging much
about the internals. Which is the correct way in most of the cases.
Itroducing a feature that could possibly be a bottleneck, needs a bit
of more research.

> In other words this would help most people most of the time who have
> run into this rather common situation and have solved it in ways that
> would be equally performant without
> making specific optimizations like splitting into multiple queries.
>

That makes it a plugin material imho.

Also in the given example above, this *might* already work :

class CommentRating < AR:Base
 belongs_to :comment
 belongs_to :user
end

class Comment < AR::Base
 has_many :comment_ratings
 belongs_to :user
end

class Post < AR::Base
 has_many :comments, :include => :comment_ratings
 belongs_to :user
end

class User < AR::Base
 has_many :posts
 has_many :comments, :through=>:posts
end

Needs to be verified though.

-Pratik

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to