ocean-rails 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/ocean_application_controller.rb +1 -5
- data/lib/ocean/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c3ae94042c710802aa3e4ae565a82daad1d252a
|
4
|
+
data.tar.gz: c7f81b494efb7a75be1d89ddb83196e3db5f5318
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e64edcb5dcd728fe6f5715d8e39d02c96bc31844fdd62819af1b614dec2e8caba7afc2072b7510d7a855430d89ffadb6860efa9c8384e331bfcc1e8ac0396994
|
7
|
+
data.tar.gz: 6caa66fdbac4ff464a0ec76b6c42327338577e6965fdc49a0c10775e9ba71d437b59475f8e4e93abe411b751639264a4522d9a91cf300f48b8b5ddf45a6a1f58
|
@@ -178,10 +178,6 @@ module OceanApplicationController
|
|
178
178
|
locals: {m.class.model_name.i18n_key => m}) }
|
179
179
|
count = resources.count
|
180
180
|
total_count = x.unscope(:limit, :offset).count
|
181
|
-
# page = nil
|
182
|
-
# page_size = nil
|
183
|
-
# prev_page = nil
|
184
|
-
# next_page = nil
|
185
181
|
attrs = {count: count,
|
186
182
|
total_count: total_count
|
187
183
|
}
|
@@ -194,7 +190,7 @@ module OceanApplicationController
|
|
194
190
|
total_pages = (total_count.to_f / page_size.to_f).ceil
|
195
191
|
last_page = total_pages - 1
|
196
192
|
prev_page = page > 0 && page - 1
|
197
|
-
next_page = page
|
193
|
+
next_page = page < last_page && page + 1
|
198
194
|
links['first_page'] = {href: url_for(params.merge(page: 0)), type: 'application/json'}
|
199
195
|
links['last_page'] = {href: url_for(params.merge(page: last_page)), type: 'application/json'}
|
200
196
|
links['previous_page'] = {href: url_for(params.merge(page: prev_page)), type: 'application/json'} if prev_page
|
data/lib/ocean/version.rb
CHANGED