June 2008
3 posts
Recently I’ve been using the great Rails 2.1 addition called named_scope to help simplify the process of building queries with meaningful names. Certainly you could do something similar by creating a custom method, but as I wrote earlier, the advantage of named_scope is that the scopes are composable: you can chain them together to build ever more powerful queries. That’s why...
Jun 26th
2 tags
New in Rails 2.1: Timestamped migrations
What was wrong with migrations? If you’ve been part of any development team that was larger than the “Army of One” you’ve probably run into an issue with migrations. It’s happened to me a few times: one member of the teams goes head-down on some problem and it takes longer than expected. Not wanting to check in ‘broken” code the patch builds up for a...
Jun 2nd
2 tags
New in Rails 2.1: named_scope
Rails 2.1 Released If you haven’t heard, the release of Rails 2.1 was announced during core member Jeremy Kemper’s keynote Saturday morning (but it didn’t actually get released until around 2am the next morning). named_scope One of my favorite additions to the framework is the absorption of the has_finder plugin into the framework. If you’ve used has_finder in the past...
Jun 1st