Validation failed Class must exist

后端 未结 8 1512
面向向阳花
面向向阳花 2020-12-13 17:30

I have been (hours) trouble with associations in Rails. I found a lot of similar problems, but I couldn\'t apply for my case:

City\'s class:

class Ci         


        
8条回答
  •  佛祖请我去吃肉
    2020-12-13 17:59

    Rails 5

    If you have a belongs_to relationship to :parent then you have to pass an existing parent object or create a new one then assign to children object.

提交回复
热议问题