lib/zendesk_api/collection.rb in zendesk_api-1.3.9 vs lib/zendesk_api/collection.rb in zendesk_api-1.4.0
- old
+ new
@@ -261,10 +261,14 @@
end
# @private
def to_ary; nil; end
+ def respond_to?(name)
+ super || Array.new.respond_to?(name)
+ end
+
# Sends methods to underlying array of resources.
def method_missing(name, *args, &block)
if resource_methods.include?(name)
collection_method(name, *args, &block)
elsif Array.new.respond_to?(name)
@@ -322,9 +326,12 @@
block.call(*arguments)
end
self.next
end
+
+ page(nil)
+ clear_cache
end
def _save(method = :save)
return self unless @resources