Class: Golden::Menu::HierarchicalMenusController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Golden::Menu::HierarchicalMenusController
- Includes:
- TheSortableTreeController::Rebuild
- Defined in:
- app/controllers/golden/menu/hierarchical_menus_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #list ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
24 25 26 27 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 24 def create @menu.save respond_with @menu end |
#destroy ⇒ Object
34 35 36 37 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 34 def destroy @menu.destroy respond_with @menu end |
#edit ⇒ Object
21 22 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 21 def edit end |
#index ⇒ Object
8 9 10 11 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 8 def index @menu = @menus.nested_set.select('id, url, name, description, parent_id') respond_with @menus end |
#list ⇒ Object
39 40 41 42 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 39 def list @menu = @menus.nested_set @menus = @menus.paginate page: params[:page] end |
#new ⇒ Object
17 18 19 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 17 def new respond_with @menu end |
#show ⇒ Object
13 14 15 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 13 def show respond_with @menu end |
#update ⇒ Object
29 30 31 32 |
# File 'app/controllers/golden/menu/hierarchical_menus_controller.rb', line 29 def update @menu.update_attributes respond_with @menu end |