RoR: NoMethodError when executing delete_all for a has_many relationship

后端 未结 5 1979
眼角桃花
眼角桃花 2021-01-22 18:01

My classes are as follows, with Customer inheriting from User using the single-table inheritance approach. User has attributes name and email while Order has destination.

<
5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-22 18:22

    I guess you were right about the problem about the ruby version. I found this question.

    The guy had a similar problem and he fixed it by switching his ruby version from ruby-2.2.0 to ruby-2.1.1.

    If it's not the ruby version, it could be the ActiveRecord Version.

提交回复
热议问题