Eager load extended associations

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:

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 [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-talk?hl=en.

On Dec 21, 8:42 am, elioncho [email protected] 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 [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-talk?hl=en.