assignment for a database class in ruby on rails