-
21
APR
2012Let's Patch Rails
In celebration of my first ever trip to RailsConf next week I wanted to be a good open source citizen and contribute a patch.
I'm giving a presentation at the conference on various random features that the framework provides. I selected features from many places like blog posts, books, and some that I just remembered from years of working with the software.
One of the features I decided to show was an old feature that I never see anyone use. It turns out that there's a good reason for that. When I tried it on a modern Rails, it didn't work anymore. Rails has undergone some changes under the hood and this feature was likely removed in that process. I figured out a workaround so I could still show it in my presentation, but it would be nice if I contributed the fix back to Rails so others could use it.
In this article, I will walk through the entire process of doing that.
What's Missing?
ERb has always had an under appreciated syntax tweak. Everyone knows you can write code like this: