I’m trying to write a piece of code that enables users to upload an
avatar. The user code and the avatar code does work great, but now I
want to associate the avatar with the user, which should also be
reflected in the urls.
I’ve read the B-Simple REST tutorial (http://www.b-simple.de/documents)
which explains this process for one-to-many associations. But things are
a little different for me, because I only want one avatar per user, I do
not need an index action and the urls do look different. For example, I
want /user/:user_id/avatar to show the user avatar,
/user/:user_id/avatar;edit to change the avatar etc.
Is there any way to achieve this?