Hello, I ma following ryanb screencast about Ajax, and i am trying to add an element to my list using ajax and RJS. My problem is that my object is correctly inserted but the rendering isn't working because the "bottom" property is null...
Here is the error: try { Element.insert("message_list", { after: null }); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.insert(\"message_list\", { after: null });'); throw e }
Here is my RJS File: page.insert_html :after, :message_list, :render => "message", :object => @message
And here is my html code <ul id="message_list"> <%=render :partial => "message", :collection => @messages%> <%if can? :create, Message.new %> <li id="new_message"><%= render :partial => "form"%></li> <%end%> </ul>
Any clue?