Hi all,
can somebody help me with this issue in respond_to?
def new
respond_to do |format|
format.xml { puts ''xml''}
format.html { puts ''html''}
format.pdf { puts ''pdf''}
format.js { puts ''js''}
end
end
When i run this code in FireFox i am getting "html" for puts, but if i
run the same code in IE7 then i am getting "xml" as puts. If i change
the above code as
def new
respond_to do |format|
format.pdf { puts ''pdf''}
format.html { puts ''html''}
format.xml { puts ''xml''}
format.js { puts ''js''}
end
end
and when i run it in FireFox i am getting the same "html" as puts but
in
IE7 i am getting "pdf" as puts.
The expected o/p in both the browser is "html". In FireFox i am
getting
the right o/p but not in IE7. IE7 is printing the one which is given in
the first line. How to over come this?
Thanks,
shanmu
--
Posted via http://www.ruby-forum.com/.
This is a known issue with IE sending an incorrect Accepts: header. See also this: http://www.danielcadenas.com/2008/10/internet-explorer-7-accept-header-and.html --Matt Jones On Jun 19, 10:20 am, Shanmu Gam <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi all, > > can somebody help me with this issue in respond_to? > > def new > respond_to do |format| > format.xml { puts ''xml''} > format.html { puts ''html''} > format.pdf { puts ''pdf''} > format.js { puts ''js''} > end > end > > When i run this code in FireFox i am getting "html" for puts, but if i > run the same code in IE7 then i am getting "xml" as puts. If i change > the above code as > > def new > respond_to do |format| > format.pdf { puts ''pdf''} > format.html { puts ''html''} > format.xml { puts ''xml''} > format.js { puts ''js''} > end > end > > and when i run it in FireFox i am getting the same "html" as puts but in > IE7 i am getting "pdf" as puts. > > The expected o/p in both the browser is "html". In FireFox i am getting > the right o/p but not in IE7. IE7 is printing the one which is given in > the first line. How to over come this? > > Thanks, > shanmu > -- > Posted viahttp://www.ruby-forum.com/.
Matt Jones wrote:> This is a known issue with IE sending an incorrect Accepts: header. > See also this: > > http://www.danielcadenas.com/2008/10/internet-explorer-7-accept-header-and.html > > --Matt Jones > > > On Jun 19, 10:20�am, Shanmu Gam <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Thanks Jones, -- Posted via http://www.ruby-forum.com/.