Module: Kuroko2ReadOnly::ApplicationHelper

Defined in:
app/helpers/kuroko2_read_only/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
7
8
9
# File 'app/helpers/kuroko2_read_only/application_helper.rb', line 3

def method_missing(method, *args, &block)
  if (method.to_s.end_with?('_path') || method.to_s.end_with?('_url')) && kuroko2.respond_to?(method)
    kuroko2.send(method, *args)
  else
    super
  end
end