chicks / sugarcrm

A ruby based REST Client for SugarCRM
MIT License
90 stars 64 forks source link

/Library/Ruby/Gems/1.8/gems/sugarcrm-0.9.13/lib/sugarcrm/associations/association.rb:81:in `resolve_target': undefined method `klass' for false:FalseClass (NoMethodError) #48

Closed unigate closed 13 years ago

unigate commented 13 years ago

The error comes when I do an account search by id

chicks commented 13 years ago

Can you paste your code? Also what version of ruby are you using?

unigate commented 13 years ago

The code

a = SugarCRM::Account.find_by_id( note.parent_id )

generates the error. I used Ruby 1.8.7-p334 but the error disappeared with Ruby 1.9.2-p180

chicks commented 13 years ago

Ahhh... you can just use:

a = SugarCRM::Account.find(note.parent_id)

Since find defaults to searching by id. I'll see about making this a little more clear.

chicks commented 13 years ago

BTW, 1.8.7 is supported... and find_by_id should work, but it's not the recommended path. I'll see about correcting that functionality.

sudeepsnairontash commented 10 years ago

I have upgraded to SugarCRM proffessional version 7.2.2. Since then, when I try to access the Accounts module using SugarCRM ruby gem, it shows an error as " undefined method `klass' for false:FalseClass (NoMethodError)". plz help me.