module RailsSettingsUi::RouteDelegator

Public Instance Methods

method_missing(method, *args, &block) click to toggle source

delegate url helpers to another engine

Calls superclass method
# File lib/rails-settings-ui/route_delegator.rb, line 3
def method_missing(method, *args, &block)
  if engine_route_method?(method)
    send(RailsSettingsUi.engine_name).send(method, *args)
  else
    super
  end
end
respond_to?(method) click to toggle source
Calls superclass method
# File lib/rails-settings-ui/route_delegator.rb, line 11
def respond_to?(method)
  super || engine_route_method?(method)
end

Private Instance Methods

engine_route_method?(method) click to toggle source
# File lib/rails-settings-ui/route_delegator.rb, line 16
def engine_route_method?(method)
  method.to_s =~ /_(?:path|url)$/ && send(RailsSettingsUi.engine_name).respond_to?(method)
end