Reputation: 63
I have a ~ 6000 record set of data where each record has a date field, and I'd like to segregate it by year in order to make it more manageable. I successfully generated a scaffold, then ran a migration, and put the records for the current year into the database. I then destroyed the scaffold in order to generate separate ones for each year. I tried naming the first one "2012Violation" (the scaffold that I successfully created and then destroyed was called simply "Violation")), but I'm getting the NameError "wrong constant name 2012Violation." I suspect that maybe rails doesn't allow numbers in model names. If that is indeed what is causing this error, any suggestions for how to name a bunch of different scaffolds/models that will primarily differ based on what year the record is from?
Thanks!
Upvotes: 2
Views: 1634