Creating records using RJS in rails

Posted by Elliot on Stack Overflow See other posts from Stack Overflow or by Elliot
Published on 2010-06-03T01:37:34Z Indexed on 2010/06/03 1:44 UTC
Read the original article Hit count: 284

Filed under:
|
|

Hey Everyone,

so I've watched http://railscasts.com/episodes/43-ajax-with-rjs

but I have a question:

In my view I have the following:

<div id="testly">
    <%= render :partial => "test" %>
</div>

This works.

Using create.rjs to change the content in this div, I have the following in my create.rjs file:

page.replace_html :testly, :partial => 'test'

Simply put, this should just refresh the partial right? But its not working... Would love any suggestions!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about AJAX