Module: Locomotive::ActionController::SectionHelpers

Extended by:
ActiveSupport::Concern
Included in:
BaseController, Public::BaseController
Defined in:
lib/locomotive/action_controller/section_helpers.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#sections(key = nil) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/locomotive/action_controller/section_helpers.rb', line 7

def sections(key = nil)
  if !key.nil? && key.to_sym == :sub
    @locomotive_sections[:sub] || self.controller_name.dasherize
  else
    @locomotive_sections[:main]
  end
end