Rails 3: Ajax-updating a view with a partial

后端 未结 1 1499
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-15 01:03

what am I doing wrong with the following Ajax request...?

The link/call:

<%= link_to \'Business Analysis\', it_business_analysis_path, :remote =         


        
1条回答
  •  一生所求
    2021-01-15 01:19

    Ok, for anybody having a similar isssue, I found the solution:

    The problem is that, in Rails3, Prototype was replaced with jQuery. Therefor the following code is no longer valid:

    render :update do |page|
      page.replace_html 'page_content', :partial => 'business_analysis'
    end
    

    The following 2 links will explain the details on how to deal with jQuery:

    Rails 3: Simple AJAXy Page updates?

    http://railscasts.com/episodes/205-unobtrusive-javascript

    Tom

    0 讨论(0)
提交回复
热议问题