• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 26503187301
97%

Build:
DEFAULT BRANCH: main
Ran 27 May 2026 09:38AM UTC
Jobs 1
Files 1009
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 May 2026 09:34AM UTC coverage: 96.419%. Remained the same
26503187301

push

github

web-flow
checkbox_field: positional choices in Rails shape (#4374)

Two coupled changes:

1. `checkbox_field` now accepts positional `*choices` alongside its
   existing `**options` (parity with `radio_field`). The underlying
   `Field#checkbox(*options, **)` has always supported collection
   mode; the helper just didn't expose it, so collection-mode
   checkboxes had to bypass the helper:

   ```ruby
   render(field(:tag_ids).checkbox(*options))   # before
   checkbox_field(:tag_ids, ["Foo", 1], ["Bar", 2])  # after
   ```

2. `CheckboxField#initialize` now flips incoming `[label, value]`
   pairs to the Superform-internal `[value, label]` shape that
   `Choices::Mapper` expects. This matches PR #4364's
   `SelectField` change — every MO field helper now reads its
   positional choices as `[label, value]` (matching
   `options_for_select`). `select_field`, `radio_field`, and
   `checkbox_field` array mode all use the same shape — no more
   per-helper footgun.

   Rails itself splits the convention: `options_for_select` uses
   `[label, value]` but `collection_check_boxes(:foo, items,
   :value_method, :text_method)` puts the value method first. We
   pick MO-internal consistency over per-helper Rails fidelity.

The fix surfaced while landing the species-lists projects/edit
form's project-membership checkbox group — first new array-mode
caller in the codebase. Existing tests covered Superform-shape;
one in-file test (`field(:number).checkbox([1, "A"], [2, "B"])` —
the only positional-array caller anywhere) updated to
Rails-shape. No production view callers use array-mode yet.

Added a new test exercising the helper path end-to-end with
collection-mode pairs.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

3 of 3 new or added lines in 2 files covered. (100.0%)

38985 of 40433 relevant lines covered (96.42%)

663.94 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26503187301.1 27 May 2026 09:38AM UTC 1009
96.42
GitHub Action Run
Source Files on build 26503187301
  • Tree
  • List 1009
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26503187301
  • d9dc274d on github
  • Prev Build on main (#26484127777)
  • Next Build on main (#26519524675)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc