method

sanitized

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: Filename
sanitized() public

Returns the sanitized filename.

ActiveStorage::Filename.new("foo:bar.jpg").sanitized # => "foo-bar.jpg"
ActiveStorage::Filename.new("foo/bar.jpg").sanitized # => "foo-bar.jpg"

Characters considered unsafe for storage (e.g. , $, and the RTL override character) are replaced with a dash.

Show source
Register or log in to add new notes.