lib/recurly/resource.rb in recurly-2.4.1 vs lib/recurly/resource.rb in recurly-2.4.2
- old
+ new
@@ -1,8 +1,7 @@
require 'date'
require 'erb'
-require 'recurly/resource/association'
module Recurly
# The base class for all Recurly resources (e.g. {Account}, {Subscription},
# {Transaction}).
#
@@ -115,10 +114,11 @@
#
# Account.find_each { |account| p account }
class Resource
autoload :Errors, 'recurly/resource/errors'
autoload :Pager, 'recurly/resource/pager'
+ autoload :Association, 'recurly/resource/association'
# Raised when a record cannot be found.
#
# @example
# begin
@@ -386,10 +386,9 @@
return XML.cast root
else
record = {}
end
klass ||= self
- associations = klass.associations
xml.root.attributes.each do |name, value|
record.instance_variable_set "@#{name}", value.to_s
end