activeset 0.5.5 → 0.5.6

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: c6c0f7634d74d7c800ef3386948af02977c7d9b9
4
- data.tar.gz: 41232285eaf65d508123b3cd3b07b705a503298b
3
+ metadata.gz: ff640ddf5701dcd0135532270123f046975c707c
4
+ data.tar.gz: 16b6fd9a4b307db53c4bccd6195062550451c325
5
5
  SHA512:
6
- metadata.gz: 478407175800f4d1f94a5d1a22003b7ef021072d61f1688439688a6364f6c422f4bb39b834feb1b4a0ca15b3f6f09c2b61753c344245e789ed523c7bbc4032ed
7
- data.tar.gz: c5d431b69598be45e7d1347ef1d7932f3bc99c377860c2367a3382b8ebca25cc425390f99b325ae0be07e5281fb2c0a9fc8a8c08a6ea3009af1f36748fb239a6
6
+ metadata.gz: c98f1ecd55d438fb238fe9b6595d8a661c13c9d5a8118505f04b8868a7e5768aeef87d166fb14399cae41b6d3cd63d85f26de70f1e9e3d6cc94509782e78a1ad
7
+ data.tar.gz: d02ef5fa2c2c09039da54f79f10c43fd34d82f66fa50c2a4a36846e1bc730266a92ed9041e2d7cec5d89afcc5a5701027a5eaf141a92b6c74d248330ff108184
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v 0.5.6
2
+ - Ensure that the default value for instructions when building filtering queries is '=' and not '=='
3
+ - Allow the default value for the instructions keypath's operator to be passed in
1
4
  v 0.5.5
2
5
  - In the ActiveRecord adapter for pagination, avoid an odd low-level AR bug when counting complex queries by using a simple Enumerable `length` call instead of the AR `count` method
3
6
  v 0.5.4
@@ -22,10 +22,10 @@ class ActiveSet
22
22
  attribute
23
23
  end
24
24
 
25
- def operator
25
+ def operator(default: '==')
26
26
  attribute = @path.last
27
27
  return attribute[operator_regex, 1] if attribute&.match operator_regex
28
- '=='
28
+ default
29
29
  end
30
30
 
31
31
  def associations_array
@@ -43,7 +43,7 @@ class ActiveSet
43
43
  end
44
44
 
45
45
  def arel_operation
46
- Arel::Nodes::InfixOperation.new(@instruction.operator,
46
+ Arel::Nodes::InfixOperation.new(@instruction.operator(default: '='),
47
47
  arel_column,
48
48
  arel_value)
49
49
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ActiveSet
4
- VERSION = '0.5.5'
4
+ VERSION = '0.5.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Margheim