On Dec 21, 8:42 am, elioncho
<elion...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hello,
>
> I was wondering which is the correct syntax to eager load via includes
> an extended association.
> For example, I''ll like to eager load the last_message method:
There''s no support for this that I know of
Fred>
> class Conversation < ActiveRecord::Base
> has_many :messages do
> def last_message
> find(:last)
> end
> end
> end
>
> Thank you!
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.