Come on, Eileen!

— May 28, 2006 at 21:44 PDT

Unlike Dexy's Midnight Runners, I'm no longer a one-hit-wonder. Contributor, that is. Today I got two more patches accepted to Rails (thanks Rick!). One was just to lay groundwork for my experimental ThroughExtender module that will enable some of the association collection methods (<<, build, create) for some subset of has_many :through associations - more on this in another post, and fairly soon I hope.

The more timely change was a fix to habtm create that corrects a problem where the join table wasn't being populated for newly created associated objects (#3692). As so often seems to be the case, the fix was fairly easy (almost a one-liner), but getting the test cases to prove things were working right was the harder part. And just to be a good citizen, I created a plugin that will make the exact same fix for habtm create available to those who don't run off of trunk, to tide you over until the next release version. You can get it from my public svn repository.

3 commentsassociations, plugins, rails

  1. Matt Todd2006-05-29 01:09:42

    I must say that I really like how you also made it available as a plugin. That extra effort sets the Ruby community apart, among many other things. Thanks for the excellent contributions!

    I'm working over the code to see what I can do! Still working on mastering Ruby, though, so I'm not sure exactly what I can help.


  2. Josh Susser2006-05-29 08:49:14

    @Matt: The extra effort to make it a plugin amounted to about five minutes of work. It's really a matter of attitude, and I agree with you that the Ruby community has a good one that makes it easy to make the small extra effort to be a good citizen. I would have felt bad just dropping the fix into trunk when there's such an easy way to make the fix available to everyone, and so many people have been bitten by that bug.

    I'm not sure exactly what I can help - I'll recount to you a quote from Steven Brusts's The Paths of the Dead: "Instead of asking what you could do, you ought to have been asking what needs to be done." Just keep looking for something that needs doing.

    By the way, I like the photos of Atlanta on your blog. I used to get there a lot for work, and I recognized the big round thing atop the (Chick-fil-a?) building right by the overpass.

  3. simon2006-05-29 09:34:09

    Thanks for fixing this bug. I wish I knew enough about rails to fix it myself, but it's awesome that someone stepped in and fixed it.

Sorry, comments for this article are closed.