[Ajax and RJS] :bottom is null

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

    <%=render :partial => "message", :collection => @messages%> <%if can? :create, Message.new %>
  • <%= render :partial => "form"%>
  • <%end%>

Any clue?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs