simple implementation of rails and database