Ruby on rails front end to SQL database