Sha256: e4cf48576559efad26d478146978aa33ff3699269f12d95b72b938c91d97bac9
Contents?: true
Size: 685 Bytes
Versions: 6
Compression:
Stored size: 685 Bytes
Contents
module StripeWrapper # If StripeWrapper is rendered within an application layout, this module allows # referring to the routes in the layout directly, without having to use `main_app.`. module MainAppRouteDelegator # delegate url helpers to main_app # def method_missing(method, *args, &block) # if main_app_route_method?(method) # main_app.send(method, *args) # else # super # end # end # def respond_to?(method, *args) # super || main_app_route_method?(method) # end # private # def main_app_route_method?(method) # method.to_s =~ /_(?:path|url)$/ && main_app.respond_to?(method) # end end end
Version data entries
6 entries across 6 versions & 1 rubygems