Undefined is not a function in rails 3 in_place_edit
I have an object @temp in my view and want to edit the field @temp.name in_place so i used the in_place_edit gem from ruby.
<td><%= in_place_editor_field :temp, :name, {}, :rows => 1 %></td>
The following code is created by that
n开发者_Python百科ew 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})
When visiting the site in my browser I can not click the editable field and get the following error at the line with the Ajax Code:
Uncaught TypeError: undefined is not a function
someone an idea what I have to do now?
Sorry for the early answering of my own question but using firebug for debugging I got a better exception message than in google chrome and found out that I also had to include the javascript libraries effects and controls in rails.
<%= javascript_include_tag "prototype", "effects", "controls" %>
精彩评论