How to upgrade the :update=>'div_id' option of remote_form_for from Rails 2 to Rails 3?
问题 I can't figure out how to upgrade this code from Rails 2 to Rails 3: <% remote_form_for(item, :update => 'div_id') do |f| %> ... I tried this: <%= form_for :item, :remote => true, :url => { :controller => "items", :action => "create" }, :update => 'div_id' do |f| %> ... It creates the new item but it fails in updating the content within <div id="div_id"></div> tags. It seems Rails 3 no longer supports the " :update " option for a remote form_for . Any suggestion? 回答1: You could use RJS, but