Class: Dorsale::Alexandrie::Attachment

Inherits:
Dorsale::ApplicationRecord show all
Defined in:
app/models/dorsale/alexandrie/attachment.rb

Instance Method Summary collapse

Instance Method Details

#download_filenameObject



14
15
16
17
18
19
20
# File 'app/models/dorsale/alexandrie/attachment.rb', line 14

def download_filename
  if File.extname(file_identifier) == File.extname(name)
    name
  else
    name.parameterize + File.extname(file_identifier)
  end
end