Module: Redmine::Utils

Defined in:
lib/redmine/utils.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) relative_url_root

Returns the relative root url of the application



22
23
24
25
26
# File 'lib/redmine/utils.rb', line 22

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

+ (Object) relative_url_root=(arg)

Sets the relative root url of the application



29
30
31
32
33
34
35
# File 'lib/redmine/utils.rb', line 29

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