Class: PandaCms::Menu
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- PandaCms::Menu
- Defined in:
- app/models/panda_cms/menu.rb
Instance Method Summary collapse
Instance Method Details
#generate_auto_menu_items ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'app/models/panda_cms/menu.rb', line 16 def return false if kind != "auto" # NB: Transactions are not distributed across database connections transaction do .destroy_all = .create(text: start_page.title, panda_cms_page_id: start_page.id) (parent_menu_item: , parent_page: start_page) end end |