ref: refs/heads/basesystem
commit d5c06483d0e1f823d23af35b24094981a782e798
Author: Duncan Mac-Vicar P
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@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org