Undefined method 'attributes'

80 views
Skip to first unread message

mezza

unread,
Nov 8, 2011, 5:59:15 AM11/8/11
to ActiveSalesforce
I'm trying to understand why the reload method doesn't work on a
particular object.

In an IRB session, I've instantiated a client connection and a
particular object:

ruby-1.9.2-p136 :010 > a
=> #<Account:0x00000102544590 @Id="001L0000003uA3UIAU",
@IsDeleted=false, @MasterRecordId=nil, @Name="John Doe",
@LastName=nil, @FirstName=nil, @Salutation=nil, @Type=nil,
@RecordTypeId="012D0000000MuIVIA0", @ParentId=nil, @BillingStreet=nil,
@BillingCity=nil, @BillingState=nil, @BillingPostalCode=nil,
@BillingCountry=nil, @ShippingStree...
ruby-1.9.2-p136 :011 > a.class
=> Account
ruby-1.9.2-p136 :012 > a.reload
NoMethodError: undefined method `attributes' for #<Account:
0x000001010feba8>
from ~/.rvm/gems/ruby-1.9.2-p136/gems/databasedotcom-1.2.3/lib/
databasedotcom/sobject/sobject.rb:113:in `reload'

Bizarrely, calling a.Name or a.update_attributes('Name' => 'test')
work fine.

What am I missing?

Danny Burkes

unread,
Nov 10, 2011, 1:55:04 AM11/10/11
to activesa...@googlegroups.com
You aren't missing anything- the gem just had a bug :-)

I have fixed it and pushed a new 1.2.4 version of databasedotcom to rubygems.org.  It is available immediately.

Thanks-

D


--
You received this message because you are subscribed to the Google Groups "ActiveSalesforce" group.
To post to this group, send email to activesa...@googlegroups.com.
To unsubscribe from this group, send email to activesalesfor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activesalesforce?hl=en.


mezza

unread,
Nov 14, 2011, 1:23:45 AM11/14/11
to ActiveSalesforce
Thanks Danny
Reply all
Reply to author
Forward
0 new messages