snaptable 0.6.3 → 0.6.4

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
  SHA1:
3
- metadata.gz: 1ec427aec2bd8359d265c9924d1b10608043ff3e
4
- data.tar.gz: 2433e16ffc85ce6d6fb928a2bc996cd14db4eaf2
3
+ metadata.gz: 2339f0f7b493a670cd591d36004606f8c340c802
4
+ data.tar.gz: 5a3375be3f93ec52bd933df82f1c3059dac7dc3b
5
5
  SHA512:
6
- metadata.gz: 56a42b222ea3bd747334f27f7c16f30e1e2793367a7828e626672a7a863c3e82cb732eddfd2b4345aa5c6bd81b6c44faae322ee46de3a40feb8cd07f016eb183
7
- data.tar.gz: 064ddf559ff2b1747e9eb7528ea4b3449677e85e02666675d2aea46ab6c7eefc0ae8a44e813b02d5a61503e8d34f5bea74f86ca4befbde2ed1efa60ef38a6d91
6
+ metadata.gz: 8c5bf26d5ac708709af7d59419bda846dbb9a91ab599dd06e2b6ae28663e0fce87fdc9b36251f4960c8743645717d9d1f7a2ab2dcf5531734a7ae90ed4e6c269
7
+ data.tar.gz: 97e9d96a8dfafe89f34fba22299af4aacb0b1a8ab00aab7d9258269484448cd93dbe8b1c3d82cdb14ae9ea62e8396d702af3a8d9ed831c1cfcfcf8a4349b88e0
@@ -15,7 +15,7 @@ module Snaptable
15
15
  end
16
16
 
17
17
  def filter(collection)
18
- if options[:search] == true
18
+ if options[:search] == true && !params[:query].blank?
19
19
  collection.joins(search_associations).where(query, query: "%#{params[:query]}%", id: params[:query].to_i)
20
20
  else
21
21
  collection
@@ -1,5 +1,5 @@
1
1
  module Snaptable
2
2
  module Rails
3
- VERSION = "0.6.3"
3
+ VERSION = "0.6.4"
4
4
  end
5
5
  end
@@ -1,3 +1,3 @@
1
1
  module Snaptable
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - khcr