Class: SimpleContentManagement::SimpleMenuItem

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/simple_content_management/simple_menu_item.rb

Instance Method Summary collapse

Instance Method Details

#parentsObject



17
18
19
20
21
22
23
24
25
# File 'app/models/simple_content_management/simple_menu_item.rb', line 17

def parents
	parents = []
	parent = self
	while parent.parent.present?
		parents << parent.parent
		parent = self.parent
	end
	return parents
end

#simple_menuObject



13
14
15
# File 'app/models/simple_content_management/simple_menu_item.rb', line 13

def simple_menu
	SimpleContentManagement::SimpleMenu.find simple_menu_id
end