from the book «Agile Web Dev with Rails» (3.2)