chore: keep JSON parse setter as safety net until couch_potato updated

This commit is contained in:
BenClaw
2026-05-30 20:44:14 +02:00
parent 24415b64c0
commit 1785e9ca0b
+6
View File
@@ -23,6 +23,12 @@ module Cmtool
klass.property :in_menu, type: :boolean, default: true
klass.property :page_settings, type: Hash, default: {}
# JSON string parsing (safety net until couch_potato type: Hash handles this)
klass.send(:define_method, :page_settings=) do |val|
val = JSON.parse(val) if val.is_a?(String)
super(val)
end
klass.has_ancestry by_property: :locale
klass.validates :name, presence: true