Project

General

Profile

« Previous | Next » 

Revision cd3baa12

Added by Scott Seago almost 10 years ago

fixes #6091 - menu removal wasn't traversing menu hierarchy

View differences:

app/services/menu/manager.rb
# Removes a menu item
def delete(name)
if found = self.find(name)
@menu_items.remove!(found)
@menu_items.each do |item|
if item.name == name && !item.parent.nil?
return item.parent.remove!(item)
end
end
nil
end
# Checks if a menu item exists

Also available in: Unified diff