method

attachment

rails latest stable - Class: ActiveStorage::Attached::One
attachment()
public

Returns the associated attachment record.

You don’t have to call this method to access the attachment’s methods as they are all available at the model level.