Based on the demo in Agile Web Rails 4.