# Altera ActionController::AbstractRequest#accepts para levar em conta a maneira # 'heterodoxa' que o Internet Explorer (6 e 7) utiliza no header Accept dos seus # requests HTTP, permitindo que format.any? funcione corretamente no IE. # # Fontes: # http://geminstallthat.wordpress.com/2008/05/14/ie6-accept-header-is-faulty/ # http://intertwingly.net/blog/2007/08/23/Intermittent-IE-failures class ActionController::AbstractRequest def accepts_with_faulty_header @env['HTTP_ACCEPT']='*/*' if @env['HTTP_USER_AGENT'] =~ /msie/i and @env['HTTP_USER_AGENT'] !~ /opera|webtv/i accepts_without_faulty_header end alias_method_chain :accepts, :faulty_header end