I use Paperclip for a model's avatars. In a view of the model I show a list of images, and I would like to be able to change the model's avatar by clicking on one of those images.
The 2nd answer here works well in order to update the avatar, but how can I execute it inside a link?