query_helper 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/query_helper.rb +6 -1
- data/lib/query_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b77867868fa498434ed87e31245f1b1e784d52a9c38ef7f7b4256437b97fe5
|
4
|
+
data.tar.gz: 7ba04fe2ece760c4febe40ac2fe7ef19d4e65a06d81cd30fc4c0f809c643b613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e60c8d34809ae6aafee2282419ba6a04360701ef3997f31fa88aeb09bc142d9b72ee13af1d74c8a12bf9127ac3f77f05e65c2c5c3932427f9cd9a2a38d9bcf9
|
7
|
+
data.tar.gz: cfb6c302bd792ca879933a604733d94b4c8ac8c32c510153e1fead0f438add92fd570868e28b63cd45559de7ee34ebaf51cab80ee05fa092cf34bc96b7d28416
|
data/Gemfile.lock
CHANGED
data/lib/query_helper.rb
CHANGED
@@ -123,7 +123,12 @@ class QueryHelper
|
|
123
123
|
|
124
124
|
def to_sql
|
125
125
|
query = build_query()
|
126
|
-
|
126
|
+
begin
|
127
|
+
return @model.sanitize_sql_array([query, @bind_variables])
|
128
|
+
rescue NoMethodError
|
129
|
+
# sanitize_sql_array is a protected method before Rails v5.2.3
|
130
|
+
return @model.send(:sanitize_sql_array, [query, @bind_variables])
|
131
|
+
end
|
127
132
|
end
|
128
133
|
|
129
134
|
def view_query
|
data/lib/query_helper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan McDaniel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|