Module: Landable::ApplicationHelper

Defined in:
app/helpers/landable/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



3
4
5
6
# File 'app/helpers/landable/application_helper.rb', line 3

def method_missing(method, *args, &block)
  return main_app.send(method, *args) if method =~ /_(path|url)$/ && main_app.respond_to?(method)
  super
end

Instance Method Details

#respond_to?(method) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'app/helpers/landable/application_helper.rb', line 8

def respond_to?(method)
  return true if method =~ /_(path|url)$/ && main_app.respond_to?(method)
  super
end