【发布时间】:2011-09-06 09:42:15
【问题描述】:
我的视图中有一个对象 @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
有人知道我现在要做什么吗?
【问题讨论】:
标签: jquery ruby-on-rails ruby ajax edit-in-place