Finish MVP for content editing
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
class EditableContent < ApplicationRecord
|
||||
validates :key, presence: true,
|
||||
uniqueness: { scope: :path }
|
||||
uniqueness: { scope: :context }
|
||||
|
||||
def has_content?
|
||||
content.present?
|
||||
end
|
||||
|
||||
def is_empty?
|
||||
content.blank?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user