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

railsadminteam / rails_admin / 37282845852
96%
master: 96%

Build:
Build:
LAST BUILD BRANCH: small-fixes
DEFAULT BRANCH: master
Ran 05 Oct 2026 08:23AM UTC
Jobs 19
Files 135
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

05 Oct 2026 08:13AM UTC coverage: 95.926%. First build
37282845852

push

github

mshibuya
Resolve the inverse of a polymorphic association

`has_one :comment, as: :commentable` states that the inverse
association on the child is named :commentable, but neither adapter
reported it: both read only an explicit :inverse_of option, which such
a declaration never has. (ActiveRecord's own reflection does resolve
it; the adapter was throwing that away. Mongoid does not resolve it at
all, so `as` is the only source available to both - which makes the
adapter the right place to normalize this.)

Because of that, the nested form for a polymorphic has_one rendered
the child's back-reference to its own parent, submitting a blank
commentable_type/commentable_id pair. ActiveRecord quietly tolerates
that, and so did Mongoid up to 8.x, so the bug went unnoticed under
both. Mongoid 9 rejects it outright with
Mongoid::Errors::UnrecognizedModelAlias ('Cannot find any model with
type ""'), which is how it finally surfaced.

nested_field_association? learns nothing new - it already compared
field.name against nested_in.inverse_of - but that comparison sat
behind a guard requiring the *child* to declare inverse_of, which a
polymorphic belongs_to cannot do (its inverse is genuinely ambiguous).
Promote it to a branch of its own.

The nested-many case has covered this shape since 'hides fields that
are deeply nested with inverse_of'; add the missing polymorphic
counterpart, which fails under both ORMs without the fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 91e9cca88)

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

4097 of 4271 relevant lines covered (95.93%)

268621.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-2.7-gemfiles/rails_6.1.gemfile-active_record-sqlite3 - 37282845852.1 05 Oct 2026 08:24AM UTC 255
93.34
GitHub Action Run
2 run-3.2-gemfiles/rails_8.0.gemfile-active_record-sqlite3 - 37282845852.2 05 Oct 2026 08:29AM UTC 254
94.09
GitHub Action Run
3 run-3.1-gemfiles/rails_7.1.gemfile-active_record-sqlite3 - 37282845852.3 05 Oct 2026 08:23AM UTC 256
93.9
GitHub Action Run
4 run-3.4-gemfiles/rails_8.0.gemfile-active_record-postgresql - 37282845852.4 05 Oct 2026 08:23AM UTC 256
93.36
GitHub Action Run
5 run-3.3-gemfiles/rails_8.0.gemfile-active_record-sqlite3 - 37282845852.5 05 Oct 2026 08:24AM UTC 254
94.16
GitHub Action Run
6 run-3.4-gemfiles/rails_8.0.gemfile-active_record-sqlite3 - 37282845852.6 05 Oct 2026 08:23AM UTC 256
93.39
GitHub Action Run
7 run-2.7-gemfiles/rails_6.0.gemfile-mongoid-sqlite3 - 37282845852.7 05 Oct 2026 08:25AM UTC 260
90.43
GitHub Action Run
8 run-3.2-gemfiles/rails_7.2.gemfile-active_record-sqlite3 - 37282845852.8 05 Oct 2026 08:23AM UTC 256
93.9
GitHub Action Run
9 run-3.1-gemfiles/rails_7.0.gemfile-mongoid-sqlite3 - 37282845852.9 05 Oct 2026 08:24AM UTC 260
89.64
GitHub Action Run
10 run-3.3-gemfiles/rails_7.2.gemfile-mongoid-sqlite3 - 37282845852.10 05 Oct 2026 08:23AM UTC 260
90.35
GitHub Action Run
11 run-3.2-gemfiles/rails_7.1.gemfile-mongoid-sqlite3 - 37282845852.11 05 Oct 2026 08:23AM UTC 260
90.36
GitHub Action Run
12 run-3.0-gemfiles/rails_6.1.gemfile-mongoid-sqlite3 - 37282845852.12 05 Oct 2026 08:24AM UTC 260
89.92
GitHub Action Run
13 run-3.4-gemfiles/rails_8.0.gemfile-mongoid-sqlite3 - 37282845852.13 05 Oct 2026 08:24AM UTC 260
90.11
GitHub Action Run
14 run-3.4-gemfiles/rails_8.0.gemfile-active_record-mysql2 - 37282845852.14 05 Oct 2026 08:24AM UTC 256
93.78
GitHub Action Run
15 run-2.6-gemfiles/rails_6.0.gemfile-active_record-sqlite3 - 37282845852.15 05 Oct 2026 08:26AM UTC 256
93.09
GitHub Action Run
16 run-jruby-9.4-gemfiles/rails_7.1.gemfile-active_record-mysql2 - 37282845852.16 05 Oct 2026 08:27AM UTC 256
91.87
GitHub Action Run
17 run-3.2-gemfiles/composite_primary_keys.gemfile-active_record-sqlite3 - 37282845852.17 05 Oct 2026 08:23AM UTC 256
93.09
GitHub Action Run
18 run-3.0-gemfiles/rails_7.0.gemfile-active_record-sqlite3 - 37282845852.18 05 Oct 2026 08:23AM UTC 256
92.47
GitHub Action Run
19 run-jruby-9.4-gemfiles/rails_7.1.gemfile-mongoid-sqlite3 - 37282845852.19 05 Oct 2026 08:27AM UTC 260
88.01
GitHub Action Run
Source Files on build 37282845852
  • Tree
  • List 135
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37282845852
  • e3c6f747 on github
  • Prev Build on 3.x-stable (#37280777831)
  • Next Build on 3.x-stable (#37290612927)
  • 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