Sha256: d92a96bb4154fb12a8aadcccf05977aeb592f91eba84662f9e2e07c7c1643a93
Contents?: true
Size: 864 Bytes
Versions: 2
Compression:
Stored size: 864 Bytes
Contents
module BarkestCore ## # Gives the ability to hunt for a 'main_app' helper if a URL helper is missing. module MainAppUrlHelper # :nodoc: def self.included(base) base.class_eval do # :nodoc: alias :barkest_core_original_method_missing :method_missing # :nodoc: def method_missing(method, *args, &block) if respond_to?(:main_app) main_app = send(:main_app) if main_app && main_app.respond_to?(method) return main_app.send(method, *args, &block) end end barkest_core_original_method_missing(method, *args, &block) end end end end end ActionController::Base.include BarkestCore::MainAppUrlHelper ActionMailer::Base.include BarkestCore::MainAppUrlHelper ActionView::Base.include BarkestCore::MainAppUrlHelper
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
barkest_core-1.5.4.0 | lib/barkest_core/extensions/main_app_extensions.rb |
barkest_core-1.5.3.0 | lib/barkest_core/extensions/main_app_extensions.rb |