On 20 September 2011 14:49, Mathew Vivek <[email protected]> wrote:
Please quote from the previous message and insert your comments at
appropriate points. It makes it easier to follow the thread. Thanks
>
> scope :get_by_publish_on, lambda{ |status|
> joins(:postmessages).where('status in (?)', status).order("publish_on
> desc").group('posts.id') }
Why have you used joins rather than include? You should not need the
group spec. Your names seem to change at every post, it makes it
difficult to work out what you are trying to do.
>
> thanks colin for your idea, you are insisting like this ??
I am not insisting on anything, just suggesting :)
Colin
--
gplus.to/clanlaw
--
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.