5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-01 21:36:07 +00:00

siempre devolver la ruta completa al archivo

This commit is contained in:
f 2020-08-11 10:06:23 -03:00
parent ba16d56679
commit 82e676e161
3 changed files with 8 additions and 1 deletions

View file

@ -78,11 +78,14 @@ class MetadataFile < MetadataTemplate
@path ||= Pathname.new value['path']
end
# Obtiene la ruta absoluta del archivo
#
# @return [String]
def file
if value['path'].is_a? ActionDispatch::Http::UploadedFile
value['path'].tempfile.path
else
value['path']
File.join site.path, value['path']
end
end

View file

@ -439,6 +439,8 @@ en:
locales:
mapable:
help: You can link to the article's translation by looking up its title here and pressing Add
image:
label: Imagen
reorder: 'Reorder posts'
sort:
by: 'Sort by'

View file

@ -448,6 +448,8 @@ es:
locales:
mapable:
help: Puedes vincular traducciones buscando el título aquí y presionando Agregar
image:
label: Imagen
reorder: 'Reordenar artículos'
sort:
by: 'Ordenar por'