A revised version of the PATS class example in 67-272; uses Rails 4