method

attached?

Importance_1
v6.1.3.1 - Show latest stable - 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.