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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cd74e8f24a4e6841f6bc0049c4cc729366114be762ccd79e065153dd356149ff
4
- data.tar.gz: 7cd75d322863e367a0e623a1bc6f2fdc25ce397bd77352a32b4332e294f5711e
3
+ metadata.gz: 35b77867868fa498434ed87e31245f1b1e784d52a9c38ef7f7b4256437b97fe5
4
+ data.tar.gz: 7ba04fe2ece760c4febe40ac2fe7ef19d4e65a06d81cd30fc4c0f809c643b613
5
5
  SHA512:
6
- metadata.gz: c5ded16d1e131486949a1e5fb50622da80c1f0706fb4e1c466de98a0f631f2a7942baa90b44f6f666196c4aa711b317e86781edb79150c65a27c7fb6b83ac469
7
- data.tar.gz: e481b684c397d872c9d0f1e383078f2f127f3eb0dc7a9c34f3eef3aac341849890322f5bff0a7f3d31a42dcec6d9c5cf2ba5988655e6a01de5da07712d10a0d3
6
+ metadata.gz: 0e60c8d34809ae6aafee2282419ba6a04360701ef3997f31fa88aeb09bc142d9b72ee13af1d74c8a12bf9127ac3f77f05e65c2c5c3932427f9cd9a2a38d9bcf9
7
+ data.tar.gz: cfb6c302bd792ca879933a604733d94b4c8ac8c32c510153e1fead0f438add92fd570868e28b63cd45559de7ee34ebaf51cab80ee05fa092cf34bc96b7d28416
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_helper (0.1.8)
4
+ query_helper (0.2.1)
5
5
  activerecord (~> 5.0)
6
6
  activesupport (~> 5.0)
7
7
 
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
- @model.sanitize_sql_array([query, @bind_variables])
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
@@ -1,3 +1,3 @@
1
1
  class QueryHelper
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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.0
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-12 00:00:00.000000000 Z
11
+ date: 2019-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler