2011-09-06 59 views
1

我有一個對象@temp在我看來,想要編輯的字段@ temp.name in_place所以我用紅寶石的in_place_edit寶石。未定義是不是在軌功能3 in_place_edit

<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 

人一個想法是什麼我現在要做的?

回答

0

對不起,我自己的問題的早期應答,但使用Firebug進行調試我有一個更好的異常信息比谷歌Chrome和發現,我還必須包括在軌JavaScript庫的影響和控制。

<%= javascript_include_tag "prototype", "effects", "controls" %>