|  |  |  | @ -15,6 +15,7 @@ class Memo < ApplicationRecord | 
			
		
	
		
			
				
					|  |  |  |  |   has_many :descendants, foreign_key: :root_id, class_name: 'Memo' | 
			
		
	
		
			
				
					|  |  |  |  |   has_many :children, foreign_key: :parent_id, class_name: 'Memo' | 
			
		
	
		
			
				
					|  |  |  |  |   has_many :attachments, as: :container, dependent: :destroy | 
			
		
	
		
			
				
					|  |  |  |  |   has_many :tidings, as: :container, dependent: :destroy | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   scope :field_for_list, lambda{ | 
			
		
	
		
			
				
					|  |  |  |  |     select([:id, :subject, :author_id, :sticky, :updated_at, :language, :reward, :all_replies_count, :viewed_count, :forum_id]) | 
			
		
	
	
		
			
				
					|  |  |  | 
 |