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.
7 lines
175 B
Ruby
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
|