A friend of mine sent me some code who was having trouble understanding how nested resources work in Rails. Having worked with Rails for many years, I quickly explained it to him and then shared some code. Then I enhanced the code to show him an even better way.
You can see the code at this gist. His code first, followed by my quick explanation code, and then a more complete/robust version.
There are many ways to approach this. My question is, is there a better / more robust / more solid / more flexible / etc way than this? How do you other professionals do it?