syntax error in concern

This commit is contained in:
Devin Howard 2017-01-23 13:30:11 -05:00
parent 8d40c03cce
commit 0b110cf469

View file

@ -2,7 +2,9 @@
module Attachable
extend ActiveSupport::Concern
has_many :attachments, as: :attachable, dependent: :destroy
included do
has_many :attachments, as: :attachable, dependent: :destroy
end
def images
attachments.where(file_content_type: self.image_types)