Auto-spawning Delayed Job Workers

I've been interested in simplifying lately.... using Chef (solo) to configure boxes, switching to Postgres from MySQL to get decent text search without having to run sphinx, etc. My goal recently has been to cut down the number of moving parts in my deployments to make my life a little easier. So when a client project required background processing, I re-evaluated my stock approach to see if I could simplify a bit.

More …

Quick Tip: Sending Google Chart links via email

Recently I had a client who wanted to deliver reports via email that contained a bunch of charts, and we decided on using Google Charts for the chart rendering. I used the googlecharts gem to create the links to Google. I encountered a problem with the charts not showing up in Gmail, even when the exact same code was working when viewing the reports at the site in the browser.

More …

Faker 0.9.0 released

It's been two-and-a-half years since the last release of the faker gem, so it's about time for another one. :) For a long time I've been kicking around the idea of using the I18n gem to make it easier to support different formats (think zip codes in the US vs. postal codes in the UK) without having to change the method signatures, so I sat down today to give it a whirl. I was pleasantly surprised with how quickly I was able to get it implemented, so kudos to the folks who have done all the hard work of making that gem work as well as it does.

More …

Extending a Model from an Engine in your Rails App

While working on the Rails 3 upgrade of the SaaS Rails Kit (which is available for customers, BTW), I moved most of the guts of the Kit into a plugin (engine) to make it easier to integrate into pre-existing apps. Then, as I was working on integrating the Kit into a client app, I ran into a situation where I wanted to extend one of the models provided in the plugin in the app, since this was a project-specific tweak. I mixed together a couple of suggestions that I found on there on the internets to come up with this:

More …