Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RF-DOCS]Active Record Associations Guide [ci-skip] (rails#52523)
* The images used to show the relationships of the different types of associations have both the table declarations, as well as a code sample, but the code sample is also in the guide. We could probably simplify the images by cutting off the code samples from them and leaving them in the guide code. * belongs_to section mentions bi-directional association and links to it within the same guide, but doesn't do the same for has_one and has_many, mentioned right after in the same paragraph. * There's a note about using bigint :supplier_id in the section between belongs_to and has_one, but up until that point it's always been using belongs_to in migrations... it's probably something that doesn't need to be in this area of the guide. * The has_many :through vs has_and_belongs_to_many section ends with a composite keys mention, we could link to the new guide there. * Associations between models with composite PKs may be simplified. * One example in bi-directional associations mentions Book belongs_to :writer, but then uses book.author a few lines below, which is incorrect. * STI section could be expanded, it's very useful in certain situations. * Add more info and make it clear * Group sections better * Amend the References section to be integrated with associations * Abstract and remove duplications for options and scopes Co-authored-by: Petrik de Heus <[email protected]> Co-authored-by: Rizwan Reza <[email protected]> Co-authored-by: Matheus Richard <[email protected]> Co-authored-by: Mike Stroming <[email protected]> Co-authored-by: Harriet Oughton <[email protected]>
- Loading branch information