adds consistency to answer's namespace
This commit is contained in:
@@ -15,7 +15,7 @@ class Poll::Question < ActiveRecord::Base
|
||||
|
||||
has_many :comments, as: :commentable
|
||||
has_many :answers
|
||||
has_many :question_answers, class_name: 'Poll::QuestionAnswer', foreign_key: 'poll_question_id'
|
||||
has_many :question_answers, class_name: 'Poll::Question::Answer', foreign_key: 'poll_question_id'
|
||||
has_many :partial_results
|
||||
belongs_to :proposal
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class Poll::QuestionAnswer < ActiveRecord::Base
|
||||
class Poll::Question::Answer < ActiveRecord::Base
|
||||
belongs_to :question, class_name: 'Poll::Question', foreign_key: 'poll_question_id'
|
||||
|
||||
validates :title, presence: true
|
||||
Reference in New Issue
Block a user