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

mathieuprog / polymorphic_embed / d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148
86%
master: 83%

Build:
Build:
LAST BUILD BRANCH: fix-embeds-cast-and-forms
DEFAULT BRANCH: master
Ran 22 Oct 2026 12:42PM UTC
Jobs 8
Files 5
Run time 1min
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

22 Oct 2026 11:58AM UTC coverage: 84.259% (+1.3%) from 82.933%
d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148

Pull #148

github

nduitz
Build polymorphic embed forms as phoenix_ecto does

PolymorphicEmbed.HTML.Helpers.to_form/4 now follows the rules that
phoenix_ecto uses for embeds_one and embeds_many:

- A child form uses the child changeset from changes, with its own
  params and its own action. Before, row 0 of a list got the params of
  all rows, and each changeset got the parent action.
- The form errors follow the parent action, and valid? does not change.
- form.hidden contains the primary key of the data, as in phoenix_ecto,
  and the type field.
- Without a change, a form is built with the changeset function, which
  the cast stores as on_cast in the embed type.

Two existing tests asserted the old output. The list test now expects
the value of the first row, as for the regular embed. The nil embed test
now expects the errors of the new SMS changeset, as for an Ecto embed.

All form parity tests pass.
Pull Request #148: Ecto parity

106 of 121 new or added lines in 3 files covered. (87.6%)

11 existing lines in 1 file now uncovered.

364 of 432 relevant lines covered (84.26%)

570.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
85.15
1.95% lib/polymorphic_embed.ex
4
88.68
-4.34% lib/polymorphic_embed/html/helpers.ex
1
58.06
3.23% lib/polymorphic_embed/options_validator.ex

Coverage Regressions

Lines Coverage ∆ File
11
85.15
1.95% lib/polymorphic_embed.ex
Jobs
ID Job ID Ran Files Coverage
1 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.1 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
2 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.2 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
3 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.3 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
4 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.4 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
5 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.5 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
6 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.6 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
7 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.7 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
8 d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148.8 22 Oct 2026 12:42PM UTC 5
84.26
GitHub Action Run
Source Files on build d74e2b2a7c90463340fbc83714dfc46d9b6b4134-PR-148
  • Tree
  • List 5
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #148
  • PR Base - master (#6AA26ED7...)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc