easy_filter 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/easy_filter/model_additions.rb +2 -2
- data/lib/easy_filter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODZhZjIwNWYwMDBmNjYwNzUxMjM0ZDdmYmE5MGIwYWNhMTBlMDEzMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTQ5Y2ExMDEyMWJkNzE5OGJiMGJlNGNjMGEzOWI2MmQ5NTNlMzI2Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjRhYWUzMTc5NTRmZmU0NDZkZjJhODE3NWQ3YTk0Mzk0ZGNhNjZkOWY4N2Q4
|
10
|
+
ZDU3YjA3ZmE0N2VkM2NiMDJlN2Y3ZTZiZDdmMzhjOTkxNGNhYzU5NjA4NTNh
|
11
|
+
YzMyZTc1ODkzNjM3NmU4NWJjZjU3ZDI2MmE3ZDY5OTA3OTU5Nzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTZhNDdmYjY0ZWIzYjI4MzdlZjVjZjY3N2Y3ODRhMWViMDU0MDg5NzVmMjc2
|
14
|
+
Zjc0MGViNDhhNTBhNjdlNWUxYTVhNGEyM2U0ZDUxYzcwYTEwNDg1YmIyZTkw
|
15
|
+
MDMyOGJmNDI2NzYzY2ZhMGUwNTFhMjg0NDlkNTE1YjgwMWZmNjU=
|
@@ -24,7 +24,7 @@ module EasyFilter
|
|
24
24
|
params[prefixes[:direction]] ||= 'desc'
|
25
25
|
|
26
26
|
sort_column = add_model params[prefixes[:sort]]
|
27
|
-
# TODO included model fields not in 'column_names'. Somehow need to check if given column name valid
|
27
|
+
# TODO: included model fields not in 'column_names'. Somehow need to check if given column name valid
|
28
28
|
# sort_column = column_names.include?(params[prefixes[:sort]]) ? params[prefixes[:sort]] : add_model('id')
|
29
29
|
sort_direction = %w(asc desc).include?(params[prefixes[:direction]]) ? params[prefixes[:direction]] : 'desc'
|
30
30
|
|
@@ -54,7 +54,7 @@ module EasyFilter
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def add_model(field)
|
57
|
-
return
|
57
|
+
return quoted_table_name + '.' + field unless field.include? '.'
|
58
58
|
field
|
59
59
|
end
|
60
60
|
end
|
data/lib/easy_filter/version.rb
CHANGED