Class: PandaCms::Admin::MenusController

Inherits:
PandaCms::ApplicationController show all
Defined in:
app/controllers/panda_cms/admin/menus_controller.rb

Instance Method Summary collapse

Methods inherited from PandaCms::ApplicationController

#add_breadcrumb, #authenticate_admin_user!, #authenticate_user!, #breadcrumbs, #current_user, #set_current_request_details, #user_signed_in?

Methods included from PandaCms::ApplicationHelper

#active_link?, #block_link_to, #component, #level_indent, #menu_indent, #nav_class, #nav_highlight_colour_classes, #panda_cms_editor, #panda_cms_form_with, #selected_nav_highlight_colour_classes, #table_indent, #title_tag

Instance Method Details

#indexObject

Lists all menus which can be managed by the administrator

Returns:

  • ActiveRecord::Collection An array of all menus



12
13
14
15
# File 'app/controllers/panda_cms/admin/menus_controller.rb', line 12

def index
  menus = PandaCms::Menu.order(:name)
  render :index, locals: {menus: menus}
end