Module: ViewDriver::ActionControllerExtensions::InstanceMethods

Defined in:
lib/view_driver/action_controller_extensions.rb

Instance Method Summary collapse

Instance Method Details

#default_section_templates(section, action = nil) ⇒ Object



59
60
61
# File 'lib/view_driver/action_controller_extensions.rb', line 59

def default_section_templates(section, action = nil)
  self.class.default_section_templates(section, action || action_name)
end

#parse_argument_for_sections(arg) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/view_driver/action_controller_extensions.rb', line 63

def parse_argument_for_sections(arg)
  case arg
    when Symbol
      send(arg)
    when Proc
      arg.call(self)
    when String, NilClass, FalseClass
      arg
    else
      raise ArgumentError, "Unsupported argument"
  end
end