napa_pagination 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/napa_pagination/grape_helpers.rb +1 -1
- data/lib/napa_pagination/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9996af395d6f838f304bf767fed6063624749e1
|
4
|
+
data.tar.gz: a1763953d33dccd27ea2476be785d90d573d46bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9f1afe5a822e7ba708a38fd00a5051175cad3d76a1a58af406b9b5be7aaffdcc29523b7513a5f58fa642d4d1fd2cd8da7bfb7936348e8d8f937b95940783bd5
|
7
|
+
data.tar.gz: 0cd6145aa119f18b46a852f356fb3a699fd5d3d65b8adc849d07484cfa3b528d5c5022ac5fa3ebc4bb20038284dc73d8d354b28205edc1c848f29a1f07246e1d
|
@@ -32,7 +32,7 @@ module NapaPagination
|
|
32
32
|
|
33
33
|
def order_by_params!(data)
|
34
34
|
if params[:sort_by] && data.column_names.map(&:to_sym).include?(params[:sort_by].to_sym)
|
35
|
-
sort_order = params
|
35
|
+
sort_order = params[:sort_order] || :asc
|
36
36
|
data.order!(params[:sort_by] => sort_order.to_sym)
|
37
37
|
end
|
38
38
|
data
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: napa_pagination
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darby Frey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape
|