Module: Cable::Menu::SimpleNavigationMethods

Included in:
Base
Defined in:
lib/cable/menu/simple_navigation_methods.rb

Instance Method Summary collapse

Instance Method Details

#itemsObject



6
7
8
# File 'lib/cable/menu/simple_navigation_methods.rb', line 6

def items
  self.children.where(:show_in_menu => true)
end

#keyObject



10
11
12
# File 'lib/cable/menu/simple_navigation_methods.rb', line 10

def key
  self.title.underscore.gsub(" ", "_").gsub("'","")
end

#nameObject



14
15
16
# File 'lib/cable/menu/simple_navigation_methods.rb', line 14

def name
  self.title
end

#optionsObject



18
19
20
21
# File 'lib/cable/menu/simple_navigation_methods.rb', line 18

def options
  return Hash.new if self[:options].nil?
  self[:options]
end