mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-14 17:31:42 +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
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
porque jekyll los toma como archivos ocultos
This commit is contained in:
parent
012e8f0f19
commit
5aef69cd94
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue