mincer 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
  SHA1:
3
- metadata.gz: 8cf265c8b6c7d273af1a0b224a9a775a920aa662
4
- data.tar.gz: 2979c71e82775a3d6f7d5b49eac0e7e022501f2c
3
+ metadata.gz: cf19d30ce22fd1d2c9b5dfa5749e8ff51f44280d
4
+ data.tar.gz: 9166a7ac4cef59a1f9e36b7cac62d2e43f54377c
5
5
  SHA512:
6
- metadata.gz: 7e54d841658cd07e2366f13a66454d58c54882a96dbfbd277ade65653392c43257d0934f7bd193e3cf71afd7830a5adcc1ef3e89c95f40735a29c7c5c61824c6
7
- data.tar.gz: 973a998ff2a27db653605b8448047c484720468eea2f2ae8fd8a33122a93e1f1652bd9aa663f6f494ccf23d3303b0a592820690a1aebd2c6aa4c43aba77d4b7a
6
+ metadata.gz: a74f5881b83baad2562fb960974613add4640322d91eef697b0e6352ce19c30db0b2675e16ddc185465effb76547c635c221dfeb3b56afd4106d491ef670ae93
7
+ data.tar.gz: 82f174b5bab58f7ef3488d8767338f340f6c36fa9a6036c53148fda8f00ce1d0d9fa87e28bc7de0507b42009342b503511d3bb0b710a9674ebeaa0213d3638b4
@@ -18,7 +18,8 @@ module Mincer
18
18
  end
19
19
 
20
20
  def apply_pg_search(relation, args)
21
- relation.where(conditions(args)).reorder(rank(args))
21
+ rel = relation.where(conditions(args))
22
+ rank = rank(args) ? rel.reorder(rank) : rel
22
23
  end
23
24
 
24
25
  def conditions(args)
@@ -1,7 +1,7 @@
1
1
  module Mincer
2
2
 
3
3
  def self.version
4
- Gem::Version.new '0.2.0'
4
+ Gem::Version.new '0.2.1'
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mincer
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
  - Alex Krasinsky