My first Ruby on Rails patch was just committed to the trunk. I'm now officially a Rails contributor. Yay me!
Changeset 4206 is my patch for enhancing the
:extend option to allow multiple named extension modules on associations.
I've wanted this ever since I started using extension modules. I quickly ran into a situation where I wanted to use two named modules for the same association. Here's the hacked way of doing that:
has_many :friends, do include PeopleExtension include FriendsExtension end
The change in my patch allows this more compact syntax:
has_many :friends, :extend => [PeopleExtension, FriendsExtension]
So much better!
This patch was a bit of a trial run for me to learn the whole process for putting a patch together. The actual change was only one line of Ruby code (but don't forget the 20 or so lines of tests and documentation!). Now that I seem to have the process down I can think about doing something a bit bigger.
As I get more confident in the process I'll write up a better description of how to contribute changes to Rails. The description on the Rails Trac is pretty bare-bones and takes a bit of muddling through if you've never worked on an open source project before.