diff options
| author | hukl <contact@smyck.org> | 2009-08-09 12:42:53 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-08-09 12:42:53 +0200 |
| commit | 9e3f29257ffae63bffe4fb2023c7090cfe4a73fe (patch) | |
| tree | 687187db9cb575045a56332899dc4688eeb52356 /app/controllers | |
| parent | 4867b66ee84055a70fb3395634ae848a4a072668 (diff) | |
editing menu items now works to. also some minor changes
Diffstat (limited to 'app/controllers')
| -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 |
