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



29
30
31
# File 'app/models/spotlight/main_navigation.rb', line 29

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
24
25
26
27
# File 'app/models/spotlight/main_navigation.rb', line 21

def label_or_default
  if label.present?
    label
  else
    default_label
  end
end