I’m having problems with something very simple, that i can’t quite figure out why it isn’t working.
Supposed:
Resources
- Survey
- Year
- User
Also,
- survey belongs_to :year
- survey belongs_to :user
When i try to create a new survey, if I only keep the user relation it works. But if I include both relations, then it fails with
TypeError in SurveysController#create
Cannot visit Year
I can’t figure this out… Any tips?
I had model validation in place which wasn’t right.
Of course this was wrong, i should have used
I had been using a collection for the years but turned it into a resource and forgot to check the validation.