filter_form 0.4.8 → 0.4.9

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: 80233982749c0ce6649e7cb5ea08df75503ddb04
4
- data.tar.gz: d8303dc1655a4622bcc2c547743f69eaab62567c
3
+ metadata.gz: 86d4a000a3b09a1b6b855b024360d457c86aad5f
4
+ data.tar.gz: 033bb10c05331663961be58e34bfc93fbc21cbb1
5
5
  SHA512:
6
- metadata.gz: e247edebe4d46caa7439902c70068433278daec51195c018e14b676df359d625fb3af27a79c8771aaec50d302671310b2dd3a3c03ce2eec6c3ac44e8326a5ed4
7
- data.tar.gz: 2b6c7daed3047895e05f7f12d63192ec9d8618975679fcc0b684e89d8698e2503f5e5adc0406cd9c116f8598139fabf8c6e3b56787672e5f841e106100e56c57
6
+ metadata.gz: 24d05c9e72b1b5631bf1bf98860ea934e1648957b5fe1281acba4417935fdbfa74d687a86076d7ce7b9569042bfdc388e9c30b2e3195ceba4a560aef96c27bde
7
+ data.tar.gz: 6753bcd6241eec48b6ece01f5203dbe6ae372d424b14eb6b904a56c251a521c72270952f178ecd25e950eaa21c264a3ccf91f548d27dc5a7372bd32072d57a4d
@@ -60,11 +60,12 @@ module FilterForm
60
60
  end
61
61
 
62
62
  def object_condition
63
- result = object.base.conditions.select { |condition| condition.a.first.name == input_attribute_name.to_s }
64
- if result.size > 1
65
- result.select { |condition| condition.predicate.name == predicate.to_s }.first
63
+ if options[:predicate_selector]
64
+ object.base.conditions.select { |condition| condition.a.first.name == input_attribute_name.to_s }.first
66
65
  else
67
- result.first
66
+ object.base.conditions.select do |condition|
67
+ condition.a.first.name == input_attribute_name.to_s && condition.predicate.name == predicate.to_s
68
+ end.first
68
69
  end
69
70
  end
70
71
 
@@ -1,3 +1,3 @@
1
1
  module FilterForm
2
- VERSION = '0.4.8'
2
+ VERSION = '0.4.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filter_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Li