Module: PointlessFeedback::ApplicationHelper

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

Can search for named routes directly in the main app, omitting the “main_app.” prefix



7
8
9
10
11
12
13
# File 'app/helpers/pointless_feedback/application_helper.rb', line 7

def method_missing(method, *args, &block)
  if main_app_url_helper?(method)
    main_app.send(method, *args)
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(method, include_all) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/helpers/pointless_feedback/application_helper.rb', line 15

def respond_to_missing?(method, include_all)
  main_app_url_helper?(method) || super
end