forest_liana 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/forest_liana/search_query_builder.rb +2 -1
- data/lib/forest_liana/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: f6d7a120b6d20a55fba01d5fd3ffa09bc7633d57
|
4
|
+
data.tar.gz: 7940072a665f2978ef3845c7ef6b5249760c54f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 541fd1c7fea4cfbdf4b34afc4f0e4f269df5876b7170f9a8c209a21afb574753de7439889af1107ab6025b6ef590f7d00a043df25988637d2d03c7eaa508a4f1
|
7
|
+
data.tar.gz: de458b3222e6ccb47bdbca63519382f411caa58203c27d9f6750f0ccbb1cfcda1752b118803362eb419752c02da300adb155200f7a5f10083b496c5649c21dde
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module ForestLiana
|
2
2
|
class SearchQueryBuilder
|
3
|
+
REGEX_UUID = /\A[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\z/i
|
3
4
|
|
4
5
|
def initialize(resource, params, includes)
|
5
6
|
@resource = @records = resource
|
@@ -38,7 +39,7 @@ module ForestLiana
|
|
38
39
|
if column.type == :integer
|
39
40
|
conditions << "#{@resource.table_name}.id =
|
40
41
|
#{@params[:search].to_i}"
|
41
|
-
|
42
|
+
elsif REGEX_UUID.match(@params[:search])
|
42
43
|
conditions << "#{@resource.table_name}.id =
|
43
44
|
'#{@params[:search]}'"
|
44
45
|
end
|
data/lib/forest_liana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|