method

base

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Filename
base() public

Returns the part of the filename preceding any extension.

ActiveStorage::Filename.new("racecar.jpg").base # => "racecar"
ActiveStorage::Filename.new("racecar").base     # => "racecar"
ActiveStorage::Filename.new(".gitignore").base  # => ".gitignore"
Show source
Register or log in to add new notes.