12

I'm new to Rails, so forgive my ignorance of ActiveRecord. One of my models is named "campus". I ran the migration and it pluralized everything except "campus".

I thought that was lame so I added the code to the environment config to leave everything singular.

I deleted the tables, manually edited the migration files to use singular forms, and re-ran the migrations. Now my associations to "campus" no longer work. I ran it through the console and noticed that I'm getting an uninitialized constant "Campu". So something still thinks "campus" is plural? Should I assume that config change will cause me nothing but trouble going forward?

Donald Hughes
  • 6,627
  • 8
  • 35
  • 46

1 Answers1

10

Use custom inflections. See this related question: How do I override rails naming conventions?

Community
  • 1
  • 1
Jimmy
  • 35,686
  • 13
  • 80
  • 98