5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 04:16:21 +00:00

fix: eliminar los guiones bajos al principio del nombre de archivo #14953
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

porque jekyll los toma como archivos ocultos
This commit is contained in:
f 2024-01-11 16:52:24 -03:00
parent 012e8f0f19
commit 5aef69cd94
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ module ActiveStorage
# stack.
def blob_args
params.require(:blob).permit(:filename, :byte_size, :checksum, :content_type, metadata: {}).to_h.symbolize_keys.tap do |ba|
ba[:filename] = ba[:filename].unicode_normalize
ba[:filename] = ba[:filename].unicode_normalize.sub(/\A_+/, '')
end
end
end

View file

@ -11,7 +11,7 @@ module ActionDispatch
# Devolver el nombre de archivo con caracteres unicode
# normalizados
def original_filename
@original_filename.unicode_normalize
@original_filename.unicode_normalize.sub(/\A_+/, '')
end
end
end