- Rails 8.0 now supported
- Rails 7.2 now supported
- Rails 7.1 now supported.
- Ruby 3.0 now supported.
- Rails 7.0 now supported.
- Rails 6.1 now supported.
- Rails 6 now supported.
- Fixes support for
nil
s with explicit order, when anil
is neither the first nor the last element of the explicit order, e.g.status: ['assigned', nil, 'fixed']
. #93b08877
- If a column had a
nulls:
option and there were multiple records withNULL
, all of these records but one were previously skipped. This is now fixed. #21
- Adds nulls ordering options
nulls: :first
andnulls: :last
. - Now supports Rails 5.2.
- Dropped support for Rails < 5 and Ruby < 2.3.
- The
before
andafter
methods now accept a boolean argument that indicates whether the relation should exclude the given point or not. By default the given point is excluded, if you want to include it, usebefore(false)
/after(false)
.
- Now compatible with Rails 5 beta 1.
- Optimization: do not wrap top-level disjunctive in
AND
when the column has an enumerated order. Read more. - Boolean enum columns (e.g.
[:pinned, [true, false]]
) are now automatically collapsed toORDER by column ASC|DESC
.
- Automatically add primary key when there is no unique column for the order
- Remove
complete
option - Fix Rubinius compatibility
order_query
now accepts columns as varargs. Array form is still supported.order_by
renamed toseek
complete
now defaults to true for list attributes as well.
- Dynamic query methods renamed to
order_by
- New condition option
complete
for list conditions for optimized query generation
- Wrap top-level
OR
with a redundantAND
for performance reasons. - Remove redundant parens from the query
#next(true)
and#previous(true)
returnnil
if there is only one record in total.
Initial release