dev_aliyun
p31729568 5 years ago
parent 0a3287984f
commit 032a243287

@ -2,7 +2,7 @@ class Library < ActiveRecord::Base
include AASM include AASM
belongs_to :user belongs_to :user
belongs_to :cover, class_name: 'Attachment', foreign_key: :cover_id, optional: true belongs_to :cover, class_name: 'Attachment', foreign_key: :cover_id
has_many :library_applies, dependent: :delete_all has_many :library_applies, dependent: :delete_all
has_many :attachments, as: :container has_many :attachments, as: :container

Loading…
Cancel
Save