Project

General

Profile

Feature #6711 » patch_for_mongrel.rb

should be put into /path/to/redmine/config/initializers - Ivan Cenov, 2010-10-20 21:58

 
1
# $Id: patch_for_mongrel.rb 168 2010-10-09 10:36:25Z imc $
2
# Fix for mongrel which still doesn't know about Rails 2.2's changes, 
3
# We provide a backwards compatible wrapper around the new
4
# ActionController::base.relative_url_root,
5
# so it can still be called off of the actually non-existing
6
# AbstractRequest class.
7

    
8
module ActionController
9
  class AbstractRequest < ActionController::Request
10
    def self.relative_url_root=(path)
11
      ActionController::Base.relative_url_root=(path)
12
    end
13
    def self.relative_url_root
14
      ActionController::Base.relative_url_root
15
    end
16
  end
17
end
18
#
19
# Thanks to http://www.ruby-forum.com/topic/190287
(3-3/3)