开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜