In teaching Rails students I often arrive at the point where they've created two models and set up an association and are wondering how they can make that association visible in the views.
Now my question is, are there any overview articles / tutorials / blog posts for this,
which give an overview of the different ways to show Associations in the views. For example, I see several "Association Patterns", that are, a
- 1:n association could be Aggregation or Composition as described in the UML with different implications for creation of associated entities (which might point to nested resources, only discussed in terms of routing)
- ... or something like belonging to a category etc. where you would want to choose from existing options or create a new one if the desired entity is not found; which is handled by first_or_create, but again, I haven't seen any documentation summarizing different options for that in the view (as RailsCast #57 and 258 describe, for example.)
I have tried searching for it. Also, neither Michael Hartl's Tutorial or the PragProgs "Agile Web Development with Rails" have something like that.
So, is there something out there and if not, do people think it would it be useful to create it?