mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 18:26:21 +00:00
fix: vaciar la imagen al borrarla
This commit is contained in:
parent
4fc2ece2d5
commit
581e8e10c2
1 changed files with 6 additions and 2 deletions
|
@ -42,8 +42,12 @@ class MetadataFile < MetadataTemplate
|
|||
# Asociar la imagen subida al sitio y obtener la ruta
|
||||
# @return [Boolean]
|
||||
def save
|
||||
if value['path'].blank?
|
||||
self[:value] = default_value
|
||||
else
|
||||
value['description'] = sanitize value['description']
|
||||
value['path'] = relative_destination_path_with_filename.to_s if static_file
|
||||
end
|
||||
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue