Sha256: 7380b76363879b8fa30762c3388a548452828847fc949e0e0d6926b3e0636fc1

Contents?: true

Size: 738 Bytes

Versions: 19

Compression:

Stored size: 738 Bytes

Contents

# frozen_string_literal: true

module EacRailsUtils
  module UrlHelper
    class << self
      # Returns the relative root url of the application
      def relative_url_root
        if ::ActionController::Base.respond_to?('relative_url_root')
          ::ActionController::Base.relative_url_root.to_s
        else
          ::ActionController::Base.config.relative_url_root.to_s
        end
      end

      # Sets the relative root url of the application
      def relative_url_root=(arg)
        if ::ActionController::Base.respond_to?('relative_url_root=')
          ::ActionController::Base.relative_url_root = arg
        else
          ::ActionController::Base.config.relative_url_root = arg
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
eac_rails_utils-0.25.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.24.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.23.4 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.23.3 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.23.2 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.23.1 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.23.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.22.3 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.22.2 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.22.1 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.22.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.21.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.20.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.19.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.18.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.17.2 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.17.1 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.17.0 lib/eac_rails_utils/url_helper.rb
eac_rails_utils-0.16.0 lib/eac_rails_utils/url_helper.rb