Class: PandaCms::Page

Inherits:
ApplicationRecord show all
Defined in:
app/models/panda_cms/page.rb

Instance Method Summary collapse

Instance Method Details

#update_auto_menusObject

Update any menus which include this page or its parent as a menu item

Returns:

  • nil



52
53
54
55
# File 'app/models/panda_cms/page.rb', line 52

def update_auto_menus
  menus.find_each(&:generate_auto_menu_items)
  menus_of_parent.find_each(&:generate_auto_menu_items)
end