Ruby on Rails Wednesday, November 26, 2014


On Wed, Nov 26, 2014 at 3:13 PM, Ganesh Mohan <ganeshmohan99@gmail.com> wrote:
You can do this 
has_and_belongs_to_many :messages, -> { where(created_at: '11-11-2014') } 

or you can use scope which is much better

​Hi Ganesh,

I tried various scope syntaxes but it didn't work. :(

Can you point me in the right direction, 

Thanks,
Ganesh​

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CALFmRoF7PPKcpZRntgVkg3WRgBq46yJhJ3x3_ry1d9wVR4QfpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment