Commit 29c0d900360bcc032d43f395f190a066497d0b76

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

[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 7 end
8 8  
9 9 def self.all
10   - response = request(:all_configurations)[:configuration].to_a
  10 + response = request(:all_configurations)[:configuration]
11 11 response = [] if response.nil?
  12 + response = [response] if response.is_a? (Hash)
12 13 response.map {|configuration| new configuration}
13 14 end
14 15  
... ...