Module: Caprese::UrlHelpers

Extended by:
ActiveSupport::Concern
Included in:
Controller, Controller, Serializer, Serializer
Defined in:
lib/caprese/concerns/url_helpers.rb

Instance Method Summary collapse

Instance Method Details

#url_helpersObject

Returns the proper route URL helpers based on whether or not Caprese is being used in an engine’s isolated_namespace or just a regular application



9
10
11
12
13
14
15
16
17
18
# File 'lib/caprese/concerns/url_helpers.rb', line 9

def url_helpers
  mod =
    if namespace = Caprese.config.isolated_namespace
      namespace::Engine
    else
      Rails.application
    end

  mod.routes.url_helpers
end