method

attached?

Importance_1
v7.1.3.4 - 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.