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

MushroomObserver / mushroom-observer / 26609188726
97%

Build:
DEFAULT BRANCH: main
Ran 28 May 2026 11:55PM UTC
Jobs 1
Files 1029
Run time 2min
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

28 May 2026 11:51PM UTC coverage: 96.479% (+0.02%) from 96.456%
26609188726

push

github

web-flow
CrudButton: rename, subclasses, btn:/icon: defaults; sweep callers (#4387)

* CrudActionButton: GET branch + route prefix; sweep download_button / edit_button onto it

## CrudActionButton extensions

Two small additions so `Components::CrudActionButton` can replace
all of MO's icon-button helpers, not just the destroy/patch/post/put
form-button family it covered originally:

1. **`method: :get` emits `<a>` (link_to) instead of `<form><button>`
   (button_to).** GET is idempotent — the form wrapper is overkill,
   right-click "Open in new tab" / "Copy link address" / "Save link
   as" all fail on a button, and a `<form>` is block while an `<a>`
   is inline. Internally splits `view_template` into `render_link`
   (GET) and `render_form_button` (everything else), with shared
   `button_content` (icon + `sr-only` name) between them.

2. **Path prefix from `action:` for named-route URLs.** When the
   caller's `action:` is in the `NAMED_ROUTE_ACTIONS` whitelist
   (`:edit`, `:new`, `:download`), the model-target path becomes
   `edit_<type>_path`, `new_<type>_path`, etc. Other actions
   (HTTP verbs like `:patch`, or unset) keep the bare resource path
   — the HTTP method dispatches the controller action via Rails'
   RESTful routes.

## Sweep helpers onto it

Two `LinkHelper` button-helpers were carrying their own hand-rolled
`button_atts` + `link_to` blocks — duplicating the html_options
shape with the rest of the button family, and (as a bonus) leaking
the `:icon` kwarg through to the rendered HTML as an invalid attr
(`<a icon="edit" …>`). Both now delegate to `Components::CrudActionButton`:

- **`edit_button`** — GET-style edit link. Now: `crud_action_button(
  target:, name:, method: :get, action: :edit, **args)`. Renders
  same `<a>` element, minus the bogus `icon=""` attribute.
- **`download_button`** — GET-style download link for a species_list.
  Now: `crud_action_button(name:, target: new_download_species_list_path(...),
  method: :get, action: ... (continued)

168 of 170 new or added lines in 27 files covered. (98.82%)

39237 of 40669 relevant lines covered (96.48%)

664.06 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
90.91
app/components/crud_button/edit.rb
1
66.67
0.0% app/helpers/glossary_terms_helper.rb
Jobs
ID Job ID Ran Files Coverage
1 26609188726.1 28 May 2026 11:55PM UTC 1029
96.48
GitHub Action Run
Source Files on build 26609188726
  • Tree
  • List 1029
  • Changed 22
  • Source Changed 22
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26609188726
  • 2c572f6c on github
  • Prev Build on main (#26550324451)
  • Next Build on main (#26630754906)
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