Skip to content

Instantly share code, notes, and snippets.

@bjhaid
Created August 17, 2011 12:54
Show Gist options
  • Save bjhaid/1151477 to your computer and use it in GitHub Desktop.
Save bjhaid/1151477 to your computer and use it in GitHub Desktop.
Sugar.count(:conditions => {:phone_work => "LIKE %#{params[:cid_number]}%"})
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil
sugar.rb
#the class defines the webservices to connect to sugarCRM
class Sugar < SugarCRM::Contact
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment