Module: Bumbleworks::Rails::ApplicationHelper
- Defined in:
- app/helpers/bumbleworks/rails/application_helper.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
4
5
6
7
8
9
10
|
# File 'app/helpers/bumbleworks/rails/application_helper.rb', line 4
def method_missing method, *args, &block
if method_is_main_app_url_helper?(method)
main_app.send(method, *args)
else
super
end
end
|
Instance Method Details
#method_is_main_app_url_helper?(method) ⇒ Boolean
20
21
22
|
# File 'app/helpers/bumbleworks/rails/application_helper.rb', line 20
def method_is_main_app_url_helper?(method)
method.to_s =~ /(_path|_url)$/ && main_app.respond_to?(method)
end
|
#respond_to?(method) ⇒ Boolean
12
13
14
15
16
17
18
|
# File 'app/helpers/bumbleworks/rails/application_helper.rb', line 12
def respond_to?(method)
if method_is_main_app_url_helper?(method)
true
else
super
end
end
|