mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 23:06:21 +00:00
feat: eliminar el archivo si se elimina el blob
This commit is contained in:
parent
3cd483bb79
commit
8e75a188c8
1 changed files with 8 additions and 0 deletions
|
@ -23,6 +23,14 @@ module ActiveStorage
|
||||||
Pathname.new(path).dirname.basename.to_s
|
Pathname.new(path).dirname.basename.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Elimina el archivo
|
||||||
|
#
|
||||||
|
# @param :key [String]
|
||||||
|
# @return [nil]
|
||||||
|
def delete(key)
|
||||||
|
FileUtils.rm_f(path_for(key))
|
||||||
|
end
|
||||||
|
|
||||||
# Solo copiamos el archivo si no existe
|
# Solo copiamos el archivo si no existe
|
||||||
#
|
#
|
||||||
# @param :key [String]
|
# @param :key [String]
|
||||||
|
|
Loading…
Reference in a new issue