ref: refs/heads/master
commit 17aba7d919e3f4d350b5d50e84dc57262fd3002c
Author: Michal Zugec
Date: Fri Sep 11 10:49:00 2009 +0200
correctly update
---
.../app/controllers/network/routes_controller.rb | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/plugins/network/app/controllers/network/routes_controller.rb b/plugins/network/app/controllers/network/routes_controller.rb
index e87c963..571d132 100644
--- a/plugins/network/app/controllers/network/routes_controller.rb
+++ b/plugins/network/app/controllers/network/routes_controller.rb
@@ -15,9 +15,13 @@ class Network::RoutesController < ApplicationController
end
@route = Route.find(root[:id])
@route.via = root[:via]
- @route.save
- render :show
-# show
+ respond_to do |format|
+ if @route.save
+ format.xml { head :ok }
+ else
+ format.xml { render :xml => @route.errors, :status => :unprocessable_entity }
+ end
+ end
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org