Module: ActiveList::Rails::Integration::ViewsHelper

Defined in:
lib/active_list/rails/integration.rb

Instance Method Summary collapse

Instance Method Details

#list(*args, &block) ⇒ Object

Calls the generated view helper



25
26
27
28
29
30
31
32
33
34
# File 'lib/active_list/rails/integration.rb', line 25

def list(*args, &block)
  options = args.extract_options!
  name = args.shift
  kontroller = controller.class
  begin
    helper_method = "_#{kontroller.controller_name}_#{__method__}_#{name || kontroller.controller_name}_tag".to_sym
    kontroller = kontroller.superclass
  end until respond_to?(helper_method)
  send(helper_method, options, &block)
end