diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/menu_items_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/menu_items_controller.rb b/app/controllers/menu_items_controller.rb index 48018800..f169e0ca 100644 --- a/app/controllers/menu_items_controller.rb +++ b/app/controllers/menu_items_controller.rb | |||
| @@ -54,6 +54,16 @@ class MenuItemsController < ApplicationController | |||
| 54 | head :ok | 54 | head :ok |
| 55 | end | 55 | end |
| 56 | 56 | ||
| 57 | def move_up | ||
| 58 | MenuItem.find(params[:id]).move_higher | ||
| 59 | redirect_to menu_items_path | ||
| 60 | end | ||
| 61 | |||
| 62 | def move_down | ||
| 63 | MenuItem.find(params[:id]).move_lower | ||
| 64 | redirect_to menu_items_path | ||
| 65 | end | ||
| 66 | |||
| 57 | private | 67 | private |
| 58 | 68 | ||
| 59 | def menu_item_params | 69 | def menu_item_params |
