belongs_to through associations

前端 未结 7 871
自闭症患者
自闭症患者 2020-11-30 17:19

Given the following associations, I need to reference the Question that a Choice is attached through from the Choice model. I have bee

7条回答
  •  生来不讨喜
    2020-11-30 18:10

    The has_many :choices creates an association named choices, not choice. Try using current_user.choices instead.

    See the ActiveRecord::Associations documentation for information about about the has_many magic.

提交回复
热议问题