Mailinglist Archive: yast-commit (1771 mails)

< Previous Next >
[yast-commit] <rest-service> network : allow to retrieve settings by id
  • From: Duncan Mac-Vicar P <dmacvicar@xxxxxxx>
  • Date: Thu, 27 Aug 2009 13:25:36 +0200
  • Message-id: <E1MiTqP-0006iU-JV@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit d5c06483d0e1f823d23af35b24094981a782e798
Author: Duncan Mac-Vicar P <dmacvicar@xxxxxxx>
Date: Thu Aug 27 13:25:36 2009 +0200

allow to retrieve settings by id
---
.../app/controllers/vendor_settings_controller.rb | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/webservice/app/controllers/vendor_settings_controller.rb
b/webservice/app/controllers/vendor_settings_controller.rb
index 0fb9b1d..20d9420 100644
--- a/webservice/app/controllers/vendor_settings_controller.rb
+++ b/webservice/app/controllers/vendor_settings_controller.rb
@@ -9,5 +9,12 @@ class VendorSettingsController < ApplicationController
format.json { render :json => VendorSetting }
end
end
-
+
+ def show
+ setting = VendorSetting.find(params[:id])
+ respond_to do |format|
+ format.xml { render :xml => settings.to_xml }
+ format.json { render :json => setting.value.to_json }
+ 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