respond_to ordering still causing havoc with Internet Explorer 7

At least a year ago, I ran into this guy’s problem. Today, I just ran into a similar situation with Rails 3′s class-level respond_to / instance-level respond_with pattern.

I had the following declarations at the controller’s class level:

I only wanted the JSON format for the create action, so I thought this would be pretty harmless. It isn’t. In Internet Explorer 7, the first declaration causes refreshes of the DesignsController#index action to return the JSON representation, whereas initial page loads show the HTML version. Swapping the first and second declarations fixed this issue.

I presume that the cause is the same as the linked article?

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • HackerNews
  • LinkedIn
  • Reddit
  • Slashdot
  • Technorati
  • Twitter
This entry was posted in Ruby and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>