2014-02-09 18:05:57 +02:00
|
|
|
class Qanswer < ActiveRecord::Base
|
|
|
|
|
attr_accessible :question_id, :answer_id
|
|
|
|
|
|
|
|
|
|
belongs_to :question
|
2015-09-10 12:39:52 +03:00
|
|
|
belongs_to :answer
|
2014-08-18 21:26:45 +03:00
|
|
|
|
2014-02-09 18:05:57 +02:00
|
|
|
has_and_belongs_to_many :registrations
|
2014-11-09 18:25:36 +02:00
|
|
|
|
|
|
|
|
validates :question, :answer, presence: true
|
2014-02-09 18:05:57 +02:00
|
|
|
end
|