Skip to main content
Paul Welty, PhD AI, WORK, AND STAYING HUMAN

· ruby-on-rails · 1 min read

Rails + sugarcrm - an alternative approach

Discover a faster, simpler way to connect Rails with SugarCRM by accessing the database directly, avoiding slow API calls for seamless synchronization.

Duration: 1:14 | Size: 1.4 MB

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.

Nobody takes you aside anymore

Print taught a generation when to stop. What we lose when the machines absorb the constraints that used to form us.

Your AI agents need a water cooler

Coordination is a property of the room, not the org chart. What that means when your coworkers are agents.

On the death of the author and the birth of the detector

Why worrying about AI authorship is lazier, and more prejudiced, than it looks.

The work of being available now

A book on AI, judgment, and staying human at work.

The practice of work in progress

Practical essays on how work actually gets done.

Memory is (almost) solved. time is next.

AI can't tell if a memory is two minutes or two weeks old. The fix isn't making models feel time — it's cache invalidation: an as-of stamp on every fact, a clock in the context, and a freshness window for anything volatile.

Did the state change? A simple test for whether work actually happened

Either something exists now that did not exist before, or it does not. A simple test for whether work actually happened, and what changes when you build your systems so they can't record anything else.

Rails + sugarcrm + soap - get a list of sugar accounts into Rails as an array

Integrate SugarCRM with Rails using SOAP to effortlessly sync company names and streamline your project management workflow.

Rails: Parsing ical calendar on a password-protected webdav server

Learn how to parse iCal calendars from a password-protected WebDAV server using Ruby on Rails and the iCalendar plugin for seamless integration.

Nested resources in Ruby on Rails: Why bother?

Discover the pros and cons of using nested resources in Ruby on Rails and learn when they truly add value to your application development.