Finish MVP for content editing

This commit is contained in:
2025-05-29 14:18:14 +04:00
parent 6713665a61
commit 6014134396
13 changed files with 92 additions and 59 deletions

View File

@@ -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