Hi,

I have a legacy web site based on ruby on rails 3.0.9 which works just fine
with Firefox, chrome and IE 8, but I receive an HTTP 406 error every time
when I check the web site with Internet Explorer 9. I narrowed down the
problem to the respond_to + format.js + render :update trio, but I did not
manage to solve the problem until now.

I created a small example for reproduction:

The action from the controller:

def change
if params[:kind]
respond_to do |format|
format.js do
render :update do |page|
# originally we have a much more complicated logic here
# ...
page.replace_html 'list_of_numbers', :partial => params[:kind]
# we even have this:
# page << "changePrefix();"
end
end
end
end
end

The view:

<%= link_to("odd", url_for(:controller => "main", :action => "change",
:kind => "odd"), :remote => true) %>
<%= link_to("even", url_for(:controller => "main", :action => "change",
:kind => "even"), :remote => true) %>
<div id="list_of_numbers"><%= render :partial => "odd" %><div>

On the server side I see this:

Started GET "/change?kind=odd" for 10.0.8.9 at Wed Jan 04 11:10:59 +0100
2012 Processing by MainController#change as HTML Parameters:
{"kind"=>"odd"} Completed 406 Not Acceptable in 0ms

And the IE 9 says quite the same.

Any ideas why this doesn't work with IE9?

Thank you in advance!

Sincerely,
Zsolt

--
http://zsoltfabok.com/blog

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Fabokzs at Jan 6, 2012 at 2:40 pm
    Hi,

    It turned out that the 1.7_rc2 version of prototype.js, which is
    delivered with rails 3.0.9, had some issues with render :update. After
    using the latest stable version of prototype.js (1.7.0) the problem
    disappeared.

    Cheers,
    Zsolt
    On Jan 4, 12:02 pm, Zsolt Fabok wrote:
    Hi,

    I have a legacy web site based on ruby on rails 3.0.9 which works just fine
    with Firefox, chrome and IE 8, but I receive an HTTP 406 error every time
    when I check the web site with Internet Explorer 9. I narrowed down the
    problem to the respond_to + format.js + render :update trio, but I did not
    manage to solve the problem until now.

    I created a small example for reproduction:

    The action from the controller:

    def change
    if params[:kind]
    respond_to do |format|
    format.js do
    render :update do |page|
    # originally we have a much more complicated logic here
    # ...
    page.replace_html 'list_of_numbers', :partial => params[:kind]
    # we even have this:
    # page << "changePrefix();"
    end
    end
    end
    end
    end

    The view:

    <%= link_to("odd", url_for(:controller => "main", :action => "change",
    :kind => "odd"), :remote => true) %>
    <%= link_to("even", url_for(:controller => "main", :action => "change",
    :kind => "even"), :remote => true) %>
    <div id="list_of_numbers"><%= render :partial => "odd" %><div>

    On the server side I see this:

    Started GET "/change?kind=odd" for 10.0.8.9 at Wed Jan 04 11:10:59 +010
    2012 Processing by MainController#change as HTML Parameters:
    {"kind"=>"odd"} Completed 406 Not Acceptable in 0ms

    And the IE 9 says quite the same.

    Any ideas why this doesn't work with IE9?

    Thank you in advance!

    Sincerely,
    Zsolt

    --http://zsoltfabok.com/blog
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 4, '12 at 1:29p
activeJan 6, '12 at 2:40p
posts2
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Fabokzs: 2 posts

People

Translate

site design / logo © 2022 Grokbase