recourse 5.9.0 → 5.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ba8a80061822d678d1c06188fbb414a30f289cb66ad3bcab42a3f49b8547f5d
4
- data.tar.gz: 97c05101da058c66b87b5a743bc86f88d045b3af82f597975ba1889bed3f984a
3
+ metadata.gz: 70d04d12275cf8524fd076d13543cb7fa1bb606e317fef64d21eff5b13abf92c
4
+ data.tar.gz: 13ea5ed9a84fcd3e069ec8ebe613e93dff6a4c8ba7a11214fdc1539f3e98e6de
5
5
  SHA512:
6
- metadata.gz: 655a718dabdb3ef9293fc01fdcb2955564cceed83244ec6c39f93fe29223eed5a616907116843d9482eb7d4141d6f11358403f55bcf924bec78b206295238a8e
7
- data.tar.gz: 87c137dbd709ee575981876bf3d3de2a6c6eaae3a09d747ee1b89e67f24c5ba52ffd1f0305953171e38cf8bc6aead8d7e0510cb1f1753ae2046f088137d6cc2d
6
+ metadata.gz: 336ac0bda118932020f25bbb5f4ac1754bdedea678fd27692689456521e457a02d75ca02ef8554d2033cf717e9e040953f3f21cc97d523efc0ab9ef3789f5409
7
+ data.tar.gz: e1b962b9bb79ce0409f921199e794470365d4edbbaf118a40ddf8f43f3bebacd592e0f8660d9b165901e96b0708a6be236dffb2a4675052995bf2ea9c4c8b325
@@ -18,6 +18,9 @@ en:
18
18
  ago: "%{distance} ago"
19
19
  all: All %{models}
20
20
  all_values: All
21
+ # A boolean's two, as a reader reads them rather than as a database writes them.
22
+ affirmative: 'Yes'
23
+ negative: 'No'
21
24
  # Why a model pointing several ways cannot be positioned without a word from it.
22
25
  ambiguous_position: "%{model} points several ways, so which of them its position is
23
26
  counted within is not the gem's to guess. Answer `recourse_siblings` with the rows
@@ -15,13 +15,17 @@ module Recourse
15
15
  boolean_filter predicate, column, label if boolean_column? column
16
16
  end
17
17
 
18
- # The two a boolean admits, as the words a table already prints for them. The
18
+ # The two a boolean admits, read as a reader reads them rather than as the
19
+ # database writes them: a menu offering `true` and `false` says what is stored
20
+ # and not what is being asked. A host wanting words of its own -- `Stopped` and
21
+ # `Reachable` over a column called `stopped` -- names them with `values:`. The
19
22
  # way back is the bare `All`: a column called `signed` pluralizes to nothing
20
23
  # anybody would write, so the line says what it does rather than what it is of.
21
24
  def boolean_filter(predicate, column, label)
22
25
  title = label || resource_model.human_attribute_name(column)
26
+ values = [[t('recourse.affirmative'), true], [t('recourse.negative'), false]]
23
27
 
24
- filter_menu predicate, title, %w[true false], t('recourse.all_values')
28
+ filter_menu predicate, title, values, t('recourse.all_values')
25
29
  end
26
30
 
27
31
  def boolean_column?(column)
@@ -1,4 +1,4 @@
1
1
  module Recourse
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '5.9.0'
3
+ VERSION = '5.9.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recourse
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.9.0
4
+ version: 5.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob