query_helper 0.1.0 → 0.1.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 +1 -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: 871736bd5aa9e012fb55ce1738a150782de390cefa9275c2d61e5d5bd89cdf84
|
4
|
+
data.tar.gz: 7c11403e23c7b6247a540c475dae7aa083ffb79cf4f1f0ec944a583f86f8eccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2105e8fee2c52885ef26b333eebe43cf017e030a6ee9420fc573f044c2d619586a9bdcf8569856861ce4599a24607284d1d80823d664c47f8465378b86bceffb
|
7
|
+
data.tar.gz: 0e2a4dc0b3a310f81e1713a78d61707d8d02a82b6300d7676ee6ec442f8d89302e74cf3bb81a1e13857cdf65d6d5246a19fbc13d16308ca35c4e47aa13dfb771
|
data/Gemfile.lock
CHANGED
data/lib/query_helper.rb
CHANGED
@@ -131,7 +131,7 @@ class QueryHelper
|
|
131
131
|
raise InvalidQueryError.new("a valid model must be included to run a custom SQL query") unless @model < ActiveRecord::Base
|
132
132
|
# If an active record query is passed in, find the model and sql from the query
|
133
133
|
elsif @query.class < ActiveRecord::Relation
|
134
|
-
@model
|
134
|
+
@model ||= @query.model
|
135
135
|
@query = @query.to_sql
|
136
136
|
else
|
137
137
|
raise InvalidQueryError.new("unable to determine query type")
|
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.1.
|
4
|
+
version: 0.1.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-08-
|
11
|
+
date: 2019-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|