Rails best_in_place jQuery in place editing :activator button not working

大憨熊 提交于 2019-12-05 08:49:34

Are you using the partial to display a list of artists? Perhaps the ID isn't specific enough, so it's getting confused since there's an activator link with id "activator", but there are multiple "activator"s at the same time. Try being more specific with the ID. Something like:

<%= best_in_place_if can?(:edit, Artist), @artist, :display_name, type: :input, :activator => "#activator-#{@artist.id}" %>
<a href="#" id="activator-#{@artist.id}">Edit</a>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!