adds consistency to answer's namespace
This commit is contained in:
9
app/models/poll/question/answer.rb
Normal file
9
app/models/poll/question/answer.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class Poll::Question::Answer < ActiveRecord::Base
|
||||
belongs_to :question, class_name: 'Poll::Question', foreign_key: 'poll_question_id'
|
||||
|
||||
validates :title, presence: true
|
||||
|
||||
def description
|
||||
super.try :html_safe
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user