summaryrefslogtreecommitdiff
path: root/lib/overwrite.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-01-13 14:10:59 +0100
committermguetlein <martin.guetlein@gmail.com>2011-01-13 14:10:59 +0100
commit1db377c898a49417c669a52aaf75014f6a31158f (patch)
treeaf2391c8efb293124dd1c4672112d9afced51a40 /lib/overwrite.rb
parentf2ca545448ab8a6f654309f23cfce9416b2e9856 (diff)
remove old classification? in model.rb, add ie hack to overwrite
Diffstat (limited to 'lib/overwrite.rb')
-rw-r--r--lib/overwrite.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/overwrite.rb b/lib/overwrite.rb
index e5ed5c3..ffeba21 100644
--- a/lib/overwrite.rb
+++ b/lib/overwrite.rb
@@ -1,6 +1,10 @@
# class overwrites aka monkey patches
# hack: store sinatra in global var to make url_for and halt methods accessible
-before{ $sinatra = self unless $sinatra }
+before {
+ $sinatra = self unless $sinatra
+ # stupid internet explorer does not ask for text/html, add this manually
+ request.env['HTTP_ACCEPT'] += ";text/html" if request.env["HTTP_USER_AGENT"]=~/MSIE/
+}
# handle errors manually
# this is to return 502, when an error occurs during a rest-call (see rest_client_wrapper.rb)