Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Answer < ApplicationRecord
- belongs_to :response
- belongs_to :question
- has_many :answer_opens, dependent: :destroy
- has_many :answer_dates, dependent: :destroy
- accepts_nested_attributes_for :answer_opens, allow_destroy: true
- accepts_nested_attributes_for :answer_dates, allow_destroy: true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement