From: David Lutterkort <lut...@redhat.com> --- server/lib/cimi/helpers/cimi_helper.rb | 24 ------------------------ 1 file changed, 24 deletions(-)
diff --git a/server/lib/cimi/helpers/cimi_helper.rb b/server/lib/cimi/helpers/cimi_helper.rb index 5e74c2c..e23d819 100644 --- a/server/lib/cimi/helpers/cimi_helper.rb +++ b/server/lib/cimi/helpers/cimi_helper.rb @@ -85,27 +85,3 @@ module CIMI end end - -class Array - def to_xml_cimi_collection(_self) - model_name = first.class.xml_tag_name - XmlSimple.xml_out({ - "xmlns" => "http://schemas.dmtf.org/cimi/1", - "uri" => [ _self.send(:"#{model_name.underscore.pluralize}_url") ], - "name" => [ "default" ], - "created" => [ Time.now.to_s ], - model_name => map { |model| { 'href' => model.uri } } - }, :root_name => "#{model_name}Collection") - end - - def to_json_cimi_collection(_self) - model_name = first.class.xml_tag_name - { - "uri" => _self.send(:"#{model_name.underscore.pluralize}_url"), - "name" => "default", - "created" => Time.now.to_s, - model_name.pluralize.uncapitalize => map { |model| { 'href' => model.uri } } - }.to_json - end - -end -- 1.8.1.2