Commit 7d10d8ef9eecc9f42ceca6e774139232d883f366

Authored by João M. M. da Silva + Rafael Manzo
Committed by Alessandro Palmeira
1 parent ae6f2af1

[Mezuro] Fixed Kalibro::Project.all when it should return just 1 project

and Kalibro::Configuration.all when it should return just 1
configuration
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
plugins/mezuro/lib/kalibro/configuration.rb
@@ -7,8 +7,9 @@ class Kalibro::Configuration < Kalibro::Model @@ -7,8 +7,9 @@ class Kalibro::Configuration < Kalibro::Model
7 end 7 end
8 8
9 def self.all 9 def self.all
10 - response = request(:all_configurations)[:configuration].to_a 10 + response = request(:all_configurations)[:configuration]
11 response = [] if response.nil? 11 response = [] if response.nil?
  12 + response = [response] if response.is_a? (Hash)
12 response.map {|configuration| new configuration} 13 response.map {|configuration| new configuration}
13 end 14 end
14 15