Rails + SugarCRM - An alternative approach
After slogging through connecting Rails and Sugar via SOAP, I was tired and frustrated. The API is slow, and doing anything meaningful took a long time (ok, it took 30 seconds, but that seems slow to me; aren’t computers supposed to be fast?!). So, I came up with an alternative approach.
I know that Active Record (or whatever it’s called) in Rails is really just a fancy wrapper for the database. So, I created a second database connection, directly to the Sugar database!
You just have to setup new models and controllers in Rails. But, that’s not too hard. See this solution (http://pragdave.pragprog.com/pragdave/2006/01/sharing_externa.html). Use option 3. It worked well. Once you get the mapping figured out, you can even use the join tables, relationships, etc. It all works transparently.
I use this to synchronize various objects and fields.
Of course, you have to have access to the database. And, of course, I know I’m majorly in danger of screwing something up. And you have to figure out the inner workings of the Sugar database. And, of course, this might not work on the next version, etc., etc.
But, heck it is fast! And very easy to use!
If you want to know more, just let me know.
Featured writing
When your brilliant idea meets organizational reality: a survival guide
Transform your brilliant tech ideas into reality by navigating organizational challenges and overcoming hidden resistance with this essential survival guide.
Server-Side Dashboard Architecture: Why Moving Data Fetching Off the Browser Changes Everything
How choosing server-side rendering solved security, CORS, and credential management problems I didn't know I had.
AI as Coach: Transforming Professional and Continuing Education
Transform professional and continuing education with AI-driven coaching, offering personalized support, accountability, and skill mastery at scale.
Books
The Work of Being (in progress)
A book on AI, judgment, and staying human at work.
The Practice of Work (in progress)
Practical essays on how work actually gets done.
Recent writing
Start, ship, close, sum up: rituals that make work resolve
Most knowledge work never finishes. It just stops. The start, ship, close, and sum-up methodology creates deliberate moments that turn continuous work into resolved units.
Notes and related thinking
Google Criticized for Privacy Issues
Explore the critique of Google’s privacy practices as Ian Hickson defends the company's intentions and highlights the impact of public skepticism.
Llama 2 avoids errors by staying quiet, GPT-4 gives long, if useless, samples
Discover how Llama 2 outperforms GPT-4 in generating reliable code, revealing crucial insights on the effectiveness of large language models.
NoMethodError (undefined method `finder') with Engines and Rails 2.2
Fix the NoMethodError with ActionMailer in Rails 2.2 by applying a simple patch. Save time and troubleshoot efficiently with our guide.