0

Can someone expand on this question and answer for me?

Rails don't generate created_at for fixture

I have a number of fixture files named 'noddys.yml' i.e. plural and they work find but I've just hit one where 'bigears.yml' does not work whilst 'bigear.yml' does. I've looked at my models, fixture files etc and cannot see the difference between the 'noddy' class and the 'bigear' class - what precisely should I be looking at?

Community
  • 1
  • 1
Paul D Smith
  • 639
  • 5
  • 16

1 Answers1

0

The cause is bad inflections (Rails guessing singular/plural mappings). The issue below describes these for routes which suffer from the same problem. I also hit this so my route (path/prefix), instead of being 'new_bigear' somehow became 'new_bigearis'. Adding an irregular inflection, as per below, solved both the route and fixtures problems.

Rails routes: Wrong singular for resources

Community
  • 1
  • 1
Paul D Smith
  • 639
  • 5
  • 16