lib/recurly/resource/pager.rb in recurly-2.4.1 vs lib/recurly/resource/pager.rb in recurly-2.4.2

- old
+ new

@@ -1,5 +1,7 @@ +require 'erb' + module Recurly class Resource # Pages through an index resource, yielding records as it goes. It's rare # to instantiate one on its own: use {Resource.paginate}, # {Resource.find_each}, and <tt>Resource#{has_many_association}</tt> @@ -167,14 +169,13 @@ new(attributes) { |record| record.save! } end def find uuid if resource_class.respond_to? :find - raise NoMethodError, - "#find must be called on #{resource_class} directly" + raise NoMethodError, "#find must be called on #{resource_class} directly" end - resource_class.from_response API.get("#{uri}/#{uuid}") + resource_class.from_response API.get("#{uri}/#{ERB::Util.url_encode(uuid)}") end # @return [true, false] # @see Object#respond_to? def respond_to? method_name, include_private = false