effective_datatables 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -5
- data/app/models/effective/active_record_datatable_tool.rb +5 -3
- data/lib/effective_datatables/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: d9060f91d84bd318fe28e34f45e090d549de9223
|
4
|
+
data.tar.gz: ddeb0892a9608be234b1ce6782bd1cc4d855f8e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c510040563247f7d309fa7692b1e41e0ff5b96fa2a1499aacbfea45086860e0d653213f5cc2412b60365a02b7b4f203bd6b2542f75d151c8750fa9ae877d2a98
|
7
|
+
data.tar.gz: e685ae5e4807066534798f4e1b846f48742e71a716ed3a2b63ff12b810b2b6f8cab07a2d0a6e8bd17a2b1a0f9c0fbfaa8be95a61357c2a91950249dfd8167435
|
data/README.md
CHANGED
@@ -568,12 +568,13 @@ module Effective
|
|
568
568
|
|
569
569
|
def collection
|
570
570
|
[
|
571
|
-
[1, '
|
572
|
-
[2, '
|
573
|
-
[3, '
|
571
|
+
[1, 'Dana', 'Janssen', 'dana@agilestyle.com'],
|
572
|
+
[2, 'Ashley', 'Janssen', 'ashley@agilestyle.com'],
|
573
|
+
[3, 'Matthew', 'Riemer', 'matthew@agilestyle.com'],
|
574
574
|
[4, 'Stephen', 'Brown', 'stephen@agilestyle.com'],
|
575
|
-
[5, '
|
576
|
-
[6, '
|
575
|
+
[5, 'Warren', 'Uhrich', 'warren@agilestyle.com'],
|
576
|
+
[6, 'Dallas', 'Meidinger', 'dallas@agilestyle.com'],
|
577
|
+
[7, 'Nathan', 'Feaver', 'nathan@agilestyle.com']
|
577
578
|
]
|
578
579
|
end
|
579
580
|
|
@@ -18,10 +18,12 @@ module Effective
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def order(collection)
|
21
|
-
if order_column.
|
22
|
-
|
21
|
+
return collection if order_column.blank?
|
22
|
+
|
23
|
+
if [:string, :text].include?(order_column[:type])
|
24
|
+
collection.order("COALESCE(#{order_column[:column]}, '') #{order_direction}")
|
23
25
|
else
|
24
|
-
collection
|
26
|
+
collection.order("#{order_column[:column]} #{order_direction} NULLS #{order_direction == 'ASC' ? 'LAST' : 'FIRST'}")
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_datatables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|