Monthly Archives: May 2011

Data wrangling and Ruby metaprogramming

I needed to combine customer data from 2 separate sources (a homebrew warehouse and CRM) and output a report. Given I’d be dealing with similar objects with overlapping attributes, it would be really easy to make a gigantic mess with … Continue reading

Posted in Automation, Ruby, SugarCRM Ruby gem | Comments Off

Adding a namespaced Rails generator to a standalone Ruby gem

I wanted to add a generator to the SugarCRM ruby gem, but couldn’t find any straightforward resources on doing just that: taking a standalone ruby gem, and adding a¬†generator that is available from within a Rails environment. To make matters … Continue reading

Posted in Rails, Ruby, SugarCRM Ruby gem | 2 Comments

Contributing to open source

Although contributing to open source projects now seems natural to me, there was a time when it was quite daunting and I had no idea where to start. Here, I’ll guide you through the steps I took to add some … Continue reading

Posted in Rails | Comments Off

Why Service-Oriented Architecture makes sense

Service-Oriented Architecture (SOA) has been around for a long time, but in the last years it has started to become the obvious solution to many problems: where RPC, and CORBA are unwieldy, and big entreprisey J2EE apps communicating with SOAP … Continue reading

Posted in Architecture | Comments Off

Self-marking required fields in Rails 3

In a Rails 3 project I’m currently working on, I wanted to mark required fields automatically: if the model required the field to be present (via validates :presence => true or validates_presence_of), that field in the form would automatically be … Continue reading

Posted in Rails | 19 Comments