tylerrick / active_record_date_range_scopes Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
In the accompanying pull request #1 , I'm changing the *_between
scope to use arel's between
operator, instead of chaining arel's letq
and gteq
together by chaining the *_after
and *_before
scopes together...
This does 2 things:
DEPRECATION WARNING: Merging ("enrollments"."cached_latest_followup_date" >= '2018-01-01 07:00:00') and
("enrollments"."cached_latest_followup_date" <= '2018-01-03 06:59:59.999999') no longer maintain both conditions,
and will be replaced by the latter in Rails 7.0. To migrate to Rails 7.0's behavior, use
`relation.merge(other, rewhere: true)`. (called from block in delegate_date_range_scopes at
/Users/dburry/vop/active_record_date_range_scopes/lib/active_record/date_range_scopes.rb:170)
For more information on this change in Rails 7, see: https://www.mintbit.com/blog/rails-7-dot-0-and-merging-activerecord-conditions
This would allow:
Book.created_between(3.years.ago, 1.year.ago)
Book.created_between('2020-01-01', '2020-01-31')
to optionally be written as this instead:
Book.created_between(3.years.ago .. 1.year.ago)
Book.created_between('2020-01-01' .. '2020-01-31')
Builds on the work of #2.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.