Archive for August, 2008

Skinny Controllers and Overweight Models

August 17th, 2008

All Rails developers know the slogan “Skinny Controllers, Fat Models” and I heartily agree with it. Every conference you go to, you hear it. But there’s a problem! My Fat models got overweight!

ActiveRecord Read Only Model

August 17th, 2008

ActiveRecord is great in providing CRUD for your data models. In some cases, however, it’s necessary to prevent write access to these models. The data may be provided by an external source and should only be used as a reference in your application, for example.

Useless Ruby Gems for your pleasure

August 14th, 2008

The past few days I’v taken some time to find out how to create a Ruby Gem. This has been on my to-do list for quite a while, but now I’m able to tick it off.

Well, what did I make?

Ruby on Rails: UUID as your ActiveRecord primary key

August 12th, 2008

Sometimes, using the good old ‘auto increment’ from your database just isn’t good enough. If you really require that all your objects have unique ID, even across systems and different databases there’s only one way go: UUID or Universally Unique IDentifier.