2011-09-06 4 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}) 

에 의해 만들어집니다 :

Uncaught TypeError: undefined is not a function 

누군가 내가 지금해야 할 일이 무엇입니까?

답변

0

죄송합니다. 내 자신의 질문에 대한 조기 답변을 드려 죄송하지만 디버깅 용 방화 광구를 사용하면 Google 크롬보다 뛰어난 예외 메시지가 표시되며 자바 스크립트 라이브러리 효과와 컨트롤을 레일에 포함시켜야한다는 것을 알게되었습니다.

<%= javascript_include_tag "prototype", "effects", "controls" %> 
관련 문제