I have a Rails app from which I would like to convert a lead and merge it with an existing account. Does anyone have some sample code using Ruby? I have found C# and Java examples and understand the convert() method, but would love to see it done in Ruby.
convertLead method is AFAIK only available in the (older) SOAP API. databasedotcom builds on the REST API.
As with any other language, you could start from the WSDL - here is a blog post on that Ruby and Salesforce Integration with SOAP.
Google produced these two hits:
- http://www.ruby-doc.org/gems/docs/d/DerGuteMoritz-rforce-0.4.2/ConvertLead.html) (https://rubygems.org/gems/DerGuteMoritz-rforce)
which might (or might not) be better places to start from.
There is some sample code here https://github.com/BinaryMuse/rforce-wrapper but not for convert lead.
You can checkout Dailyforce a Example of Ruby on Rails with Salesforce