reworked the rails generator