A rudimentary rails implementation