Ruby constant resolution
Module and class nesting is how Ruby does namespacing, but it's not always that well known how constants are resolved.
Lessons from reading ostruct.rb
Interesting things we learnt, reading through the Ruby Standard Libary's ostruct.rb.
The future of Ruby
I am not a very old-school Rubyist. My involvement dates from 2005 when I, along with many of my Extreme Programming (XP) colleagues, joined the Great Rails Bandwagon. It is telling that so many of the people who became involved around that time were from the Agile/XP community. We were sick of the mountains of glue code and XML configuration that stood in the way of us getting things done in Enterprise Java.
Rails 3: Validation Reflection
A recent addition to `ActiveModel` is the introduction of a couple of methods for validation reflection.
Rails 3: HTML Escaping
So you've been working on Rails apps for a while, and like all good developers, you've been escaping any content rendered in your views that your application's users might have entered, right?
Rails 3: Add validations to non-ActiveRecord::Base models
Prior to Rails 3, if you wanted to add validations to models which didn't inherit from `ActiveRecord::Base`, you'd probably resort to using a gem/plugin that re-implements much of the behaviour or has some dirty hooks into the ActiveRecord private API.
Rails 3: Routing Examples
Rails 3 introduced a new routing DSL that is a little bit different from the Rails 2 version. This quick guide covers a few examples of the new routes, and how they compare to Rails 2.