It's another slow week (just 2 changes of note imho) after the release of the 1st Release Candidate (RC1) of Rails 2.1. Follow that link for installation instructions - though if you're reading this blog post you probably don't care! (because you're, you know, "living on the edge"). Cheesiness aside, be sure to report any bugs you may encounter when upgrading to 2.1 RC1 or edge at the Rails bug tracker - it is an RC so any bug reports would be very welcome and useful!

This week’s report covers changes from 12th May 2008 to 18th May 2008 (the day the corresponding Rails Envy podcast was recorded).

caches_action can has conditionals

caches_action now takes an :if option (just like caches_page does). For example:

caches_action :index, :if => { |c| !c.request.format.json? }

This little enhancement is courtesy of José Valim.

Related changeset:

Bugfix: :select option is now scanned in ActiveRecord finders to ensure needed tables are included in generated SQL

Post.find(:all, :include => :author, :select => 'posts.*, as "author_id"', :limit => 2)

Would generate an SQL statement like this:

SELECT posts.*, as "author_id" FROM "posts" LIMIT 2

Notice how the authors table is not joined. This oversight is now fixed.

Thanks go to John Devine for this bugfix.

Related changeset:

As always, let me know of any suggestions or how I can improve the Living on the Edge (of Rails) series. Also, if anyone has any recommendations of (non-ruby-related) things to do in Portland, do let me know!