ref: refs/heads/eula
commit 891917f6cf2d281934bf74bd2f8ccc54652b850d
Author: J. Daniel Schmidt
Date: Thu Oct 15 12:56:46 2009 +0200
fix json ouput for registration status
---
plugins/registration/app/models/registration.rb | 7 +++++++
.../app/views/registration/status.json.erb | 2 +-
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/plugins/registration/app/models/registration.rb b/plugins/registration/app/models/registration.rb
index 15ed442..92a7ba4 100644
--- a/plugins/registration/app/models/registration.rb
+++ b/plugins/registration/app/models/registration.rb
@@ -127,6 +127,11 @@ class Registration
end
end
+ def status_to_json( options = {} )
+ hash = Hash.from_xml(status_to_xml())
+ return hash.to_json
+ end
+
def config_to_json( options = {} )
hash = Hash.from_xml(config_to_xml())
return hash.to_json
@@ -136,4 +141,6 @@ class Registration
hash = Hash.from_xml(to_xml())
return hash.to_json
end
+
+
end
diff --git a/plugins/registration/app/views/registration/status.json.erb b/plugins/registration/app/views/registration/status.json.erb
index de74d8e..f0e25d3 100644
--- a/plugins/registration/app/views/registration/status.json.erb
+++ b/plugins/registration/app/views/registration/status.json.erb
@@ -1 +1 @@
-<%= @registration.status_to_xml if @registration -%>
\ No newline at end of file
+<%= @registration.status_to_json if @registration -%>
\ No newline at end of file
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org