开发者

link_to white remote => true throws a 406 error on IE

I've a very big problem when updating to rails 3.

If I use this:

= link_to "Show Parent Text", show_parent_path(c.id), :remote => true, :method => :get

It works great at Firefox and the controller responds normaly:

respond_to  do |format|
  format.js do
    render :update do |page|
      page.replace_html "original_#{@h.id}", :partial => "texts/original"
    end
  end
end

But Internet Explorer 9 handles the link with a GET request to show_parent_path(c.id) instead of using the AJAX request, resulting in a 406 error page.

How can I fix this? I'm having this issue with Rails 3.0.5. Thanks a开发者_如何学Go lot in advance!


For me the error occurred having an error in the JavaScript code. Eliminating this worked for me. Maybe this helps you, too?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜