mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 21: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
|
# Asociar la imagen subida al sitio y obtener la ruta
|
||||||
# @return [Boolean]
|
# @return [Boolean]
|
||||||
def save
|
def save
|
||||||
value['description'] = sanitize value['description']
|
if value['path'].blank?
|
||||||
value['path'] = relative_destination_path_with_filename.to_s if static_file
|
self[:value] = default_value
|
||||||
|
else
|
||||||
|
value['description'] = sanitize value['description']
|
||||||
|
value['path'] = relative_destination_path_with_filename.to_s if static_file
|
||||||
|
end
|
||||||
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue