On 26 November 2014 at 11:02, Ganesh Ranganathan
<[email protected]> wrote:
>
> On Wed, Nov 26, 2014 at 4:07 PM, Colin Law <[email protected]> wrote:
>>
>> Groups.first.messages.where(:created => '11-11-2014').tags
>>
>> By the way, if you mean :created_at then this will not work as
>> created_at includes the time, so to get an exact match on 11-11-2014
>> it would have to be exactly midnight.  You will have to use a time
>> range, and don't forget to watch out for the timezone.
>
>
> Hi Colin,
>
> Thanks for your reply. This won't work since messages would return an
> ActiveRelation there is no tags method on an active relation.

You are right of course.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuYz%2Bfvn-ct8-uPRvpf6GHM6%2B3Jpy5i%3DLh5iZpSp%2BDPOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to