Skip to content

Commit

Permalink
Fixed :offset off by one
Browse files Browse the repository at this point in the history
  • Loading branch information
Sijawusz Pur Rahnama committed May 17, 2012
1 parent 6ab2389 commit 3357792
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/garb/model.rb
Expand Up @@ -54,7 +54,7 @@ def all(profile, options = {})
results \
? results.concat(rs.to_a)
: results = rs
options[:offset] = results.size
options[:offset] = results.size + 1

break if limit and results.size >= limit
break if results.size >= results.total_results
Expand Down

0 comments on commit 3357792

Please sign in to comment.