diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 3a512278a..e3c55242f 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -19,7 +19,7 @@ class Attachment < ApplicationRecord scope :contains_only_project, -> { where(container_type: 'Project') } scope :contains_course_and_project, -> { contains_only_course.or(contains_only_project) } scope :mine, -> (author_id) { where(author_id: author_id) } - scope :simple_columns, -> { select(:id, :filename, :filesize, :created_on, :cloud_url, :author_id) } + scope :simple_columns, -> { select(:id, :filename, :filesize, :created_on, :cloud_url, :author_id, :content_type) } scope :search_by_container, -> (ids) {where(container_id: ids)} validates_length_of :description, maximum: 100