An example provided by "Rails 3 in Action" book.