0
我刚刚安装了遵循github说明的“on_the_spot”gem。on_the_spot宝石不工作
我试图为我的索引操作创建一个就地编辑。当我将鼠标放在应该可编辑的文本上时,什么都不会发生。只有背景颜色改变。
这是我的索引视图
<% @part_types.each do |part_type| %>
<tr>
<td><%= on_the_spot_edit part_type, :title %></td>
</tr>
<% end %>
相关的代码从控制器:
class PartTypesController < ApplicationController
#on_the_spot for in place editing
can_edit_on_the_spot
#.. rest of the controller code
end
添加到路由:这些更改后已重新启动
resources :part_types do
collection do
put :update_attribute_on_the_spot
end
end
nginx的。
谢谢
解决。我已经删除了一些JavaScript文件。只需加载jquery.js,application.js和“on_the_spot”js创建的文件即可。 –