Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> master : correctly update
  • From: Michal Zugec <mzugec@xxxxxxx>
  • Date: Fri, 11 Sep 2009 10:49:00 +0200
  • Message-id: <E1MnC7T-00047G-5r@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 17aba7d919e3f4d350b5d50e84dc57262fd3002c
Author: Michal Zugec <mzugec@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages