collate 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/collate/filter.rb +6 -2
- data/lib/collate/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: 536bf3ebe80fe656cc65593173358e2321c152a0
|
4
|
+
data.tar.gz: 2aa813459a1b5d3cb278abba9ad91ed13dc23399
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b34c1c606cf740b84bd95609a4b7720357cb97ae361be5676a51112e075e80eed5a16af2d91b8962f3b257895476e4710a3e87762ad5b9b6af58d2e4fb35120
|
7
|
+
data.tar.gz: 4ea5e69952c40537076b55d7be6b677526bfcd52e032da799e5ad3907e34f1fc99ea1a22014b98620c26132f3841adfe052426576130ee392042d81cef91b007
|
data/lib/collate/filter.rb
CHANGED
@@ -8,7 +8,7 @@ module Collate
|
|
8
8
|
|
9
9
|
attr_accessor :field, :operator, :base_model_table_name, :field_transformations, :label,
|
10
10
|
:component, :joins, :value_transformations, :grouping, :html_id, :having,
|
11
|
-
:joins_prefix, :not, :or, :field_group_type
|
11
|
+
:joins_prefix, :not, :or, :field_group_type, :param_key
|
12
12
|
|
13
13
|
def initialize(field, opt={})
|
14
14
|
opt.each do |f, value|
|
@@ -30,6 +30,8 @@ module Collate
|
|
30
30
|
self.field_transformations ||= []
|
31
31
|
self.value_transformations ||= []
|
32
32
|
|
33
|
+
self.param_key ||= generate_param_key
|
34
|
+
|
33
35
|
self.html_id ||= param_key.gsub('{','').gsub('}','').gsub('.','_')
|
34
36
|
|
35
37
|
field_parts = self.field.to_s.partition('.')
|
@@ -107,9 +109,11 @@ module Collate
|
|
107
109
|
self.value_transformations << [:downcase]
|
108
110
|
end
|
109
111
|
end
|
112
|
+
|
113
|
+
|
110
114
|
end
|
111
115
|
|
112
|
-
def
|
116
|
+
def generate_param_key
|
113
117
|
key = ""
|
114
118
|
field_transformations.each do |ft|
|
115
119
|
transformation = ft
|
data/lib/collate/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Page
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-05-
|
12
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|