8000 Raise error when embedded document doesn't have root document (rebased) by smtlaissezfaire · Pull Request #770 · mongomapper/mongomapper · GitHub
[go: up one dir, main page]

Skip to content

Raise error when embedded document doesn't have root document (rebased) - #770

Merged
smtlaissezfaire merged 1 commit into
masterfrom
cursor/embedded-no-root-document-ceb7
Nov 4, 2026
Merged

smtlaissezfaire merged 1 commit into
masterfrom
cursor/embedded-no-root-document-ceb7

Conversation

@smtlaissezfaire
Copy link
Copy Markdown
Member

Rebase of #682 onto current master.

Originally opened by @mtsmfm. Their commit is preserved (author Fumiaki MATSUSHIMA); this branch does not modify the original pull request.

save / save! on an embedded document with no root document now raise MongoMapper::NoRootDocument instead of returning nil.

Rework

The 2021 commit cherry-picked cleanly. lib/mongo_mapper.rb and spec/functional/embedded_document_spec.rb had moved since then, but the hunks did not overlap. No follow-up code changes were required. The full local spec suite passes (Ruby 3.2, Rails 8.1, MongoDB 7.0).

Open in Web Open in Cursor 

@smtlaissezfaire
smtlaissezfaire merged commit 08715ec into master Nov 4, 2026
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0