Rails RJS AJAX Question
Rails - 3.0 - Trying to make an ajax call but I run into an error.
Controller - Home
开发者_运维百科def test
end
View - home#index
<div class="test">
Testing here
</div><%= link_to 'Test', test_path, :remote=>true %>
View - test.rjs
page[:test].replace_html :partial => "home/blah"
When I click on the link I get this -
try {
$("test").update("blah blah blah blah");
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('$(\"test\").update(\"blah blah blah blah\");'); throw e }
Any help or advice greatly appreciated. Thanks in advance.
Great Post on an example of using Rails3 + CRUD + UJS.
http://www.stjhimy.com/posts/7
精彩评论