add child attachments association

Change-Id: I5c4f55aa5f4af8d05a13937735c0fc61603a1cbe
Reviewed-on: https://gerrit.instructure.com/52608
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2015-04-21 13:06:26 -06:00
parent 556bc56cec
commit 24bb77eb85
1 changed files with 1 additions and 0 deletions

View File

@ -63,6 +63,7 @@ class Attachment < ActiveRecord::Base
has_one :sis_batch
has_one :thumbnail, :foreign_key => "parent_id", :conditions => {:thumbnail => "thumb"}
has_many :thumbnails, :foreign_key => "parent_id"
has_many :children, foreign_key: :root_attachment_id, class_name: 'Attachment'
has_one :crocodoc_document
has_one :canvadoc
belongs_to :usage_rights