5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-29 21:26:21 +00:00

fix: cambiar el valor una sola vez

This commit is contained in:
f 2024-04-17 18:04:19 -03:00
parent 0e010e804c
commit 9fb3601d92
No known key found for this signature in database

View file

@ -161,7 +161,7 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
# once => el campo solo se puede modificar si estaba vacío # once => el campo solo se puede modificar si estaba vacío
def writable? def writable?
case layout.metadata.dig(name, 'writable') case layout.metadata.dig(name, 'writable')
when 'once' then value.blank? when 'once' then value_was.blank?
else true else true
end end
end end