Class: Spree::Attachment

Inherits:
Asset
  • Object
show all
Defined in:
app/models/spree/attachment.rb

Constant Summary collapse

ATTACHMENT_ATTRIBUTES =
%i[alt attachment_content_type attachment_file_name
attachment_updated_at id position type].freeze
PERMITTED_ATTACHMENT_ATTRIBUTES =
%i[alt attachment position viewable_id viewable_type].freeze

Instance Method Summary collapse

Instance Method Details

#no_attachment_errorsObject



12
13
14
# File 'app/models/spree/attachment.rb', line 12

def no_attachment_errors
  errors.add :attachment, "Paperclip returned errors for file #{attachment_file_name}" if attachment.errors.any?
end