When a user runs:
rails g scaffold Comment name:string message:string post:belongs_to
... the comment is marked as being emdedded in the post.
Since Mongoid supports belongs_to, it seems less surprising for belongs_to to generate that exact relationship, rather than embedded_in.
SO question: https://stackoverflow.com/questions/61760838/use-of-belongs-to-vs-embedded-in-in-rails-mongoid
- causes
-
MONGOID-5533 Unnecessary edits to Comment model in Rails Getting Started
- Closed
- is related to
-
MONGOID-4661 Test applications that use Mongoid
- Closed
- links to