Module: ActiveList::ActionPack::ViewsHelper

Defined in:
lib/active_list/action_pack.rb

Instance Method Summary collapse

Instance Method Details

#list(*args, &block) ⇒ Object

Calls the generated view helper



31
32
33
34
35
36
37
38
39
40
# File 'lib/active_list/action_pack.rb', line 31

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