From 9e3f29257ffae63bffe4fb2023c7090cfe4a73fe Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 9 Aug 2009 12:42:53 +0200 Subject: editing menu items now works to. also some minor changes --- app/controllers/menu_items_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/controllers/menu_items_controller.rb') 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 end def edit + @menu_item = MenuItem.find( params[:id] ) end def update + @menu_item = MenuItem.find( params[:id] ) + + if @menu_item.update_attributes( params[:menu_item] ) + redirect_to menu_items_path + else + render :edit + end end def delete -- cgit v1.3