query_helper 0.2.12 → 0.2.13

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: d785c033c2c9b9f1eaa01641b8e92b8690a1a54eceb1507e58efb4a4437655ab
4
- data.tar.gz: de0529d9069f0c612b39873c69160eff8eeb52b35bcc05401026cc161b9914c9
3
+ metadata.gz: b0971fc10b2b990185b05e538e41dcb898033baa6e9f3f59c22a5c024fead8bb
4
+ data.tar.gz: 55e383eadc934c0ff9f1cb44236033b5c93b6d7b302210fc10eaff1c8e4d614f
5
5
  SHA512:
6
- metadata.gz: 39e7d8268cde0434747bfb2cc52e0f85c6d294ba18af86b5a415f5c92da2f1dfbe7822dbdc685c55f99520b15e205e2a75867db6e628b5d594730a1b472990ca
7
- data.tar.gz: efcb54e2da3b21a3c454ff490b2c892336913dde41602aa07b31edf658f4644ebcc4f1a234bff8b72706ebd8fcfc7366de24c1a88891d1a3176d72686cdceb7e
6
+ metadata.gz: 8f5c67987554c03af1a0cf2d6a72bc3e225463c33fc5e8b53fbc5689fe05888bcb364f702d771b47f23c1cf356b8c0a01d0c1c39e56afd9931e55c50cdc0d6a7
7
+ data.tar.gz: 8a65504c1ba6e8f7f5088e6dcdbeb132b438781c63efec29eb79f527d0fb18919af1f4570f10be3e0453bea014892c3dd8372388c2f6e8b8a9b536197c3f683a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- query_helper (0.2.12)
4
+ query_helper (0.2.13)
5
5
  activerecord (> 5)
6
6
  activesupport (> 5)
7
7
 
@@ -55,7 +55,7 @@ class QueryHelper
55
55
 
56
56
  def insert_order_by_and_limit_clause
57
57
  @sql.slice!(@parser.limit_clause) if @parser.limit_included? # remove existing limit clause
58
- @sql.slice!(@parser.order_by_clause) if @parser.order_by_included? # remove existing order by clause
58
+ @sql.slice!(@parser.order_by_clause) if @parser.order_by_included? && @order_by_clauses.length > 0 # remove existing order by clause
59
59
  @sql += " order by #{@order_by_clauses.join(", ")} " if @order_by_clauses.length > 0
60
60
  @sql += " limit :limit offset :offset " if @include_limit_clause
61
61
  end
@@ -1,3 +1,3 @@
1
1
  class QueryHelper
2
- VERSION = "0.2.12"
2
+ VERSION = "0.2.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan McDaniel