Method: ActiveStorage::Blob#filename

Defined in:
activestorage/app/models/active_storage/blob.rb

#filenameObject

Returns an ActiveStorage::Filename instance of the filename that can be queried for basename, extension, and a sanitized version of the filename that’s safe to use in URLs.



195
196
197
# File 'activestorage/app/models/active_storage/blob.rb', line 195

def filename
  ActiveStorage::Filename.new(self[:filename])
end