method

attached?

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: Many
attached?() public

Returns true if any attachments have been made.

class Gallery < ApplicationRecord
  has_many_attached :photos
end

Gallery.new.photos.attached? # => false
Show source
Register or log in to add new notes.