Permalink
Browse files

Fix async_count for models

  • Loading branch information...
1 parent f79ac4a commit 43a4e24ed3687fa50a7f95474063350d477f75b9 @tmm1 committed Jul 2, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sequel/async.rb
View
@@ -106,7 +106,7 @@ def async_count &cb
from_self.async_count(&cb)
else
clone(STOCK_COUNT_OPTS).async_each{|r|
- yield r.values.first.to_i
+ yield r.is_a?(Hash) ? r.values.first.to_i : r.values.values.first.to_i
}
end
nil

0 comments on commit 43a4e24

Please sign in to comment.