diff options
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/obfuscate_filename.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/app/models/concerns/obfuscate_filename.rb b/app/models/concerns/obfuscate_filename.rb deleted file mode 100644 index dc25cdbc2..000000000 --- a/app/models/concerns/obfuscate_filename.rb +++ /dev/null @@ -1,16 +0,0 @@ -module ObfuscateFilename - extend ActiveSupport::Concern - - class_methods do - def obfuscate_filename(*args) - before_action { obfuscate_filename(*args) } - end - end - - def obfuscate_filename(path) - file = params.dig(*path) - return if file.nil? - - file.original_filename = "media" + File.extname(file.original_filename) - end -end |