mercredi 29 juillet 2015

update user image using best_in_place in rails3.2

How can i change user image along with user name using best_in_place select?

<%= image_tag @assignment.user.avatar %>

<%= best_in_place @assignment, :user_id, as: :select, :collection => User.all.collect{|u| [u.id, u.first_name]} %>

on select user is updating but not the image.

Thanks

Aucun commentaire:

Enregistrer un commentaire