module Prosperity::MainAppRouteDelegator

Public Instance Methods

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

delegate url helpers to main_app

Calls superclass method
# File lib/prosperity/main_app_route_delegator.rb, line 3
def method_missing(method, *args, &block)
  if main_app_route_method?(method)
    main_app.send(method, *args)
  else
    super
  end
end
respond_to?(method) click to toggle source
Calls superclass method
# File lib/prosperity/main_app_route_delegator.rb, line 11
def respond_to?(method)
  super || main_app_route_method?(method)
end

Private Instance Methods

main_app_route_method?(method) click to toggle source
# File lib/prosperity/main_app_route_delegator.rb, line 16
def main_app_route_method?(method)
  method.to_s =~ /_(?:path|url)$/ && main_app.respond_to?(method)
end