diff options
Diffstat (limited to 'app/controllers/menu_items_controller.rb')
| -rw-r--r-- | app/controllers/menu_items_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/menu_items_controller.rb b/app/controllers/menu_items_controller.rb index 0ba56c3..7b71693 100644 --- a/app/controllers/menu_items_controller.rb +++ b/app/controllers/menu_items_controller.rb | |||
| @@ -22,9 +22,17 @@ class MenuItemsController < ApplicationController | |||
| 22 | end | 22 | end |
| 23 | 23 | ||
| 24 | def edit | 24 | def edit |
| 25 | @menu_item = MenuItem.find( params[:id] ) | ||
| 25 | end | 26 | end |
| 26 | 27 | ||
| 27 | def update | 28 | def update |
| 29 | @menu_item = MenuItem.find( params[:id] ) | ||
| 30 | |||
| 31 | if @menu_item.update_attributes( params[:menu_item] ) | ||
| 32 | redirect_to menu_items_path | ||
| 33 | else | ||
| 34 | render :edit | ||
| 35 | end | ||
| 28 | end | 36 | end |
| 29 | 37 | ||
| 30 | def delete | 38 | def delete |
