Module: Stationary::ApplicationHelper

Defined in:
app/helpers/stationary/application_helper.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/stationary/application_helper.rb', line 3

def method_missing(method_name, *args)
  # May want to drop the match on url and path in favor of having access to other
  # methods and helpers from within the main application
  if method_name.match(/_(url|path)$/) && main_app.respond_to?(method_name)
    main_app.send(method_name, *args) 
  else
    super
  end
rescue
  super
end