homework 2 on ruby on rails