选用资源报错

dev_local_2
cxt 6 years ago
parent b6fdfe3aa0
commit 55fcf27b96

@ -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

Loading…
Cancel
Save