blog - ruby

Per Request Cache for Rack

Ever wanted a cache that is bound to the current request? ... Read More

Daemonize a script or worker in Rails 3

A couple of gems allow easy daemonisation of scripts / long running processes. But as soon as you need to include your Rails environment you will run into problems. ... Read More

Secure your forms with a simple Math Captcha

As soon as your application has a form that's available to everyone, you WILL be spammed! So what can we do about it? Well, one option is to have all forms secured by authentication... OR we can use a captcha. ... Read More

GData Spreadsheet Gem released

Fresh from our office comes the GData Spreadsheet Gem. ... Read More

How to get a AuthSub session token for Google's GData

One of the more interesting things when talking to Google is Authentication. Basically, there are two methods available... The simple solution is to use username and password, the other option would be token based authentication. ... Read More

Simple authentication in Sinatra with Janrain Engage

As soon as your Sinatra app gets a bit more complicated, and you need a more sophisticated feature you cannot rely on all the nice plugins available for Rails. So you end up either writing something yourself, or using an external solution. ... Read More

Integrating Google Federated Login with your Rails app

When making one of your apps available on the google apps marketplace and you're not aiming for the full integration, pretty much all you have to do, is to allow a user to sign-in to your app using his google account. ... Read More

Make rails render different views for multiple sites

We have an app that uses the same code (and instance!) for several clients. The clients need the same kind of app, the differences are with the styling and (sometimes) the content. ... Read More

Thinking Sphinx with custom joins

Today we tried to add an attribute to our Sphinx index definition that uses an association with GROUP BY and HAVING. So we decided to fork and extend thinking sphinx. ... Read More

Calculating counts for all array items

Ever wondered how often a specific item occurs in an Array? ... Read More

Announcing Rack::ChromeFrame

Google Chrome Frame is a great way to enable modern browser features without forcing the user to upgrade or switch web browser. ... Read More