Rails' ActionMailer library can send e-mail for you, and while it can be set up to use almost any SMTP server, special requirements by Google's GMail SMTP server have presented Rails users from taking advantage of it. Ages ago I mentioned a solution to the problem, but it involved downloading a separate application called 'msmtp' and performing an ugly system call from your application.
If you were in the Rails community six months ago, you might remember the Caboose Rails Documentation Project, a drive to raise $5,000 USD to spend on improving the Rails documentation. It turns out they actually ended up with $15,000 due to the overwhelming support of the community, but the process got mired in debate about what to do with the cash.
Akhil Bansal has created a cool bash script that will create a new Rails project, import it to an SVN repository, then remove and ignore log files, sessions, temporary files, and set up database.yml correctly. I was previously using a Rake task for this, but installing this script at the OS level might prove easier for me in future.
No editorial on this, as I want to get it out quick, and I know some readers aren't subscribers to the official Rails blog.. but.. Rails 1.2 has just been released! Or, more accurately, Rails 1.2.1, as the obligatory bug-fix release followed on a little more quickly than usual :) You might want to get it straight away before the servers melt down with the rush tomorrow. Just use gem install rails --include-dependenciesas usual.
In Concerns in ActiveRecord, Jamis Buck writes about a simple technique of using modules to mix in functionality shared by multiple models without resorting to STI. This technique has been possible in Rails since.. ever, but I must admit I'd never considered it before, so I'm sure a lot of people will find it useful.
You're about to start a new Rails project. Do you type rails <project name>? No, "Stop using the rails command", says Josh Susser. If you create a dummy / default Rails project that's set up just the way you like it with plugins, your own extensions, and all those carefully defined svn:ignore flags, you can just create a new Rails project with a simple svn copy. So simple, but I've totally missed this idea, and it's a real timesaver.
Amy Hoy has written a great tutorial running through the Rails console that's suitable for both complete novices and experts (there are a couple of tricks she mentions that I didn't know at least!). Amy appears to have taken up Slash7 with a new zeal lately, so let's hope we'll see more great content like this on her blog through 2007!
css_dryer is a Rails plugin by Andrew Stewart that makes putting together stylesheets for your Rails applications more efficient than ever before. It supports nesting and basic variable interpolation. For example, here's an example of nesting:
Exactly one year ago David Heinemeier Hansson and the rest of the Rails core team (smaller back then!) unveiled Rails 1.0, the first 'production quality' release of Ruby on Rails. Alongside the release came an entirely new Rails Web site, the same as the one we're familiar with now. The next day, December 14, DHH followed up with some brief insight and wondered: "I can't wait to see where this will all go in 2006."