[skip ci] Add examples for has_{one,many} :through :source and :source_type#35612
Conversation
a126de6 to
c9e9feb
Compare
|
@vipulnsward removed the |
eileencodes
left a comment
There was a problem hiding this comment.
Reading this over I think it's a good idea to document but we should use the same example for all the docs. In this file we use accounts, books, and now health insurance plans and doctor specialities. I think we should use books - it's simple to understand and translate and doesn't rely on understanding differences of our health insurance systems.
guides/source/association_basics.md
Outdated
There was a problem hiding this comment.
Can you use a different example? I think that health care plan is confusing for non-US readers. Even US folks may not understand the difference between PPO and high deductible plan. I have one and had to look up "HDHP". 😄
There was a problem hiding this comment.
@eileencodes I'd be really happy to. My first thought was to extend one of the existing example domains, but I had the hardest time coming up with a polymorphic has_one :through example that made sense. I totally agree that the one I settled on is not very obvious/accessible. I'll give this some more thought, though I'd happily take a suggestion!
c9e9feb to
ba6f64d
Compare
|
@eileencodes thanks for your patience! I updated both examples to use the books domain - I hope that they make sense! Happy to accommodate any further suggestions 😄 |
eileencodes
left a comment
There was a problem hiding this comment.
I like these examples much better thank you!
Summary
I've often been confused about
sourceandsource_type. I thought it would be helpful to provide some examples here.