我的视图中有一个对象@temp,并且想要编辑字段@temp.name in_place,所以我使用了ruby 中的in_place_edit gem。
<td><%= in_place_editor_field :temp, :name, {}, :rows => 1 %></td>
以下代码是由它创建的
new Ajax.InPlaceEditor('temp_name_5_in_place_editor', '/temps/set_temp_name?locale=en&id=5', {callback:function(form) { return Form.serialize(form) + '&authenticity_token=' + encodeURIComponent('OX1qBv+oX0BgdF7uq7UM5rzGacmY/9ZLerE6osA6HnI=') }, rows:1})
在我的浏览器中访问该站点时,我无法单击可编辑字段并在 Ajax 代码行出现以下错误:
Uncaught TypeError: undefined is not a function
有人知道我现在要做什么吗?