method

base

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 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.