class assignment for rails controllers