Method: OldApiResource::Base#to_s

Defined in:
lib/old_api_resource/base.rb

#to_sObject Also known as: inspect

Override to_s and inspect so they only show attributes and not associations, this prevents force loading of associations when we call to_s or inspect on a descendent of base but allows it if we try to evaluate an association directly



446
447
448
# File 'lib/old_api_resource/base.rb', line 446

def to_s
  return "#<#{self.class}:0x%08x @attributes=#{self.attributes.inject({}){|accum,(k,v)| self.association?(k) ? accum : accum.merge(k => v)}}" % (self.object_id * 2)
end