I'm trying to figure out how to compare my enddate > Time.now in my where 
clause.

enddate is a date field, I'm just trying to only display products that 
haven't expired (by the date field).


I've tried...

require 'time'

products.where(['enddate > ?', Time.now]) 

-- 
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+unsubscr...@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/85bbf24d-693d-46c2-a9c8-a4a0ba81f5cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to