I am attempting to collect all entries of an object from an instance of Redmine using its ruby REST API. The code I'm trying:
require 'rubygems'
require 'active_resource'
class Issue < ActiveResource::Base
self.site = '<site url>'
self.user = '<username>'
self.password = '<password>'
self.format = :xml
end
test = Issue.all
puts test.size
test = Issue.all(:limit => 0)
puts test.size
The resulting output is:
25
25
There are thousands of entries in the database, so for the size to be 25 is clearly off. I also tried ":limit => 10" and got a size == 25, so it seems as though the ':limit' argument is being completely ignored.
I also tried Issue.find(:all, :limit => 0) and :limit => 10, both of which returned size == 25. What would be the correct method for querying active_resource without a limit?