Class: Spotlight::MainNavigation

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Translatables
Defined in:
app/models/spotlight/main_navigation.rb

Overview

Exhibit navbar links

Instance Method Summary collapse

Instance Method Details

#default_label(**options) ⇒ Object



25
26
27
# File 'app/models/spotlight/main_navigation.rb', line 25

def default_label(**options)
  I18n.t(:"spotlight.main_navigation.#{nav_type}", **options)
end

#displayable?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/models/spotlight/main_navigation.rb', line 17

def displayable?
  display?
end

#label_or_defaultObject



21
22
23
# File 'app/models/spotlight/main_navigation.rb', line 21

def label_or_default
  label.presence || default_label
end