parent
							
								
									41e510e108
								
							
						
					
					
						commit
						2fcbd4c351
					
				@ -1,4 +1,7 @@
 | 
				
			||||
class Collection < ApplicationRecord
 | 
				
			||||
  belongs_to :user
 | 
				
			||||
  belongs_to :container, polymorphic: true, optional: true
 | 
				
			||||
 | 
				
			||||
  scope :shixuns,  -> {where(container_type: 'Shixun')}
 | 
				
			||||
  scope :subjects,  -> {where(container_type: 'Subject')}
 | 
				
			||||
end
 | 
				
			||||
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue