cheap_skate 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cheap_skate/models.rb +1 -1
- metadata +2 -2
data/lib/cheap_skate/models.rb
CHANGED
@@ -34,7 +34,7 @@ module CheapSkate
|
|
34
34
|
|
35
35
|
def to_hash()
|
36
36
|
response = {"responseHeader"=>{"status"=>0, "QTime"=>self.query_time, "params"=>{"q"=>self.query, "version"=>"2.2", "rows"=>self.limit}}}
|
37
|
-
response["response"] = {"numFound"=>self.total, "start"=>self.offset, "rows"=>docs.length, "docs"=>[]}
|
37
|
+
response["response"] = {"numFound"=>self.total, "start"=>self.offset, "rows"=>(self.docs||[]).length, "docs"=>[]}
|
38
38
|
response["response"]["maxScore"] = self.max_score if self.max_score
|
39
39
|
if self.docs
|
40
40
|
self.docs.each do |doc|
|