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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -