Date range in Rails -


i´m looking find "books" between specific dates.

i have variable publishdate , want books have publish date between dates, i´m not sure operator use.

i tought of it´s not working

@books = book.where(:e_release_date => 20141217 && :e_release_date <= 20141017) 

i'm assuming using activerecord. in activerecord can query between this:

@books = book.where(:e_release_date => 20141217..20141017) 

Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -