Files
nairobi/app/models/poll/question/answer/video.rb
Javi Martín 236b58ab01 Remove duplication in code to validate video URL
We were using the same code, and the same regular expressions, in two
places. To do so, we were including a helper inside a model, which is
something we don't usually do.
2024-06-06 17:35:27 +02:00

7 lines
175 B
Ruby

class Poll::Question::Answer::Video < ApplicationRecord
belongs_to :answer, class_name: "Poll::Question::Answer"
include Videoable
validates :title, presence: true
end