instance method
filename
Ruby on Rails 6.0.6
Since v5.2.8.1Signature
filename()
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.
Source
# File activestorage/app/models/active_storage/blob.rb, line 121
def filename
ActiveStorage::Filename.new(self[:filename])
end
Defined in activestorage/app/models/active_storage/blob.rb line 121
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Blob