13 lines
219 B
Ruby
13 lines
219 B
Ruby
class EditableContent < ApplicationRecord
|
|
validates :key, presence: true,
|
|
uniqueness: { scope: :context }
|
|
|
|
def has_content?
|
|
content.present?
|
|
end
|
|
|
|
def is_empty?
|
|
content.blank?
|
|
end
|
|
end
|