Module: Redmine::Utils

Defined in:
lib/redmine/utils.rb

Class Method Summary collapse

Class Method Details

.relative_url_rootObject

Returns the relative root url of the application


19
20
21
22
23
# File 'lib/redmine/utils.rb', line 19

def relative_url_root
  ActionController::Base.respond_to?('relative_url_root') ?
    ActionController::Base.relative_url_root.to_s :
    ActionController::AbstractRequest.relative_url_root.to_s
end

.relative_url_root=(arg) ⇒ Object

Sets the relative root url of the application


26
27
28
29
30
31
32
# File 'lib/redmine/utils.rb', line 26

def relative_url_root=(arg)
  if ActionController::Base.respond_to?('relative_url_root=')
    ActionController::Base.relative_url_root=arg
  else
    ActionController::AbstractRequest.relative_url_root=arg
  end
end