rotulus 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c74625ece0961a25549797386fa66abb146564211b4dc1640abd92ac4c0e2a0
4
- data.tar.gz: 567562c553bbe914cdf5740e4262bd76b59ef04493658a68c69bd420e3109283
3
+ metadata.gz: 15fae43a1fc07b2c268c1604c065a12f0d2288d733219aa563348019a872d7a0
4
+ data.tar.gz: ca8548477eee36f6bed018d8ec20d5dd5217f74d36954f13b4e243fbaee6755e
5
5
  SHA512:
6
- metadata.gz: 9e1380f553f3a0756b36b21f2a6193ee7031fe29bc8b3478ec349f6c35d2b9292ed5afd295b6b5250b2dc4498e1d86b66d13d639ea5e3d36db78fc8868fb4e9f
7
- data.tar.gz: 625359b428c792c30a2a2ee2b6b702a2c7270e495111c284c82a1d1433eddf5d0ac485d6d5ae961128006f161c4cb01b8fa76f7ab3bd14d63cb761306a9392f6
6
+ metadata.gz: f9d0e4611e800688f8c10ad7347043a07e7358f79a4254ecac6359a1f5f4101d323cfe0b21d45b363984cdc681e3ffc8b8b9587311e96553ab952eb76016792b
7
+ data.tar.gz: a3240e33d45cd4360c4235e94860558c584a9f1f373c9ad7451ad9d819c2616f5a2e2146bef0449b716b846144ee87c19e92596c2b39c13e34bef254f49c50af
data/CHANGELOG.md CHANGED
@@ -5,4 +5,7 @@
5
5
  - Drop unnecessary ORDER BY columns following a non-nullable and distinct column.
6
6
 
7
7
  ## 0.2.2
8
- - Raise error when there is no non-nullable and distinct column in the configured order definition.
8
+ - Raise error when there is no non-nullable and distinct column in the configured order definition.
9
+
10
+ ## 0.2.3
11
+ - Replace any existing order defined on the given ar_relation
data/lib/rotulus/page.rb CHANGED
@@ -209,7 +209,7 @@ module Rotulus
209
209
  return @loaded_records unless @loaded_records.nil?
210
210
 
211
211
  @loaded_records = ar_relation.where(cursor&.sql)
212
- .order(order_by_sql)
212
+ .reorder(order_by_sql)
213
213
  .limit(limit + 1)
214
214
  .select(*select_columns)
215
215
  return @loaded_records.to_a unless paged_back?
@@ -1,3 +1,3 @@
1
1
  module Rotulus
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rotulus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uy Jayson B
@@ -64,8 +64,8 @@ dependencies:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
- description: Cursor-based pagination for apps built on Rails/ActiveRecord with sort
68
- by multiple columns support for a more stable and predictable pagination.
67
+ description: Cursor-based pagination for Rails/ActiveRecord apps with multiple column
68
+ sort and custom cursor format support for a more stable and predictable pagination.
69
69
  email:
70
70
  - uy.json.dev@gmail.com
71
71
  executables: []
@@ -116,6 +116,6 @@ requirements: []
116
116
  rubygems_version: 3.1.4
117
117
  signing_key:
118
118
  specification_version: 4
119
- summary: Cursor-based pagination for apps built on Rails/ActiveRecord with sort by
120
- multiple columns support.
119
+ summary: Cursor-based Rails/ActiveRecord pagination with multiple column sort and
120
+ custom cursor token format support.
121
121
  test_files: []