|  |  | @ -7,11 +7,11 @@ class Inform < ApplicationRecord | 
			
		
	
		
		
			
				
					
					|  |  |  |   has_many :attachments, as: :container, dependent: :destroy |  |  |  |   has_many :attachments, as: :container, dependent: :destroy | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def next_inform |  |  |  |   def next_inform | 
			
		
	
		
		
			
				
					
					|  |  |  |     Inform.where(position: self.position+1, container_id: self.course_id, container_type: 'Course') |  |  |  |     Inform.where(position: self.position+1, container_id: self.container_id, container_type: self.container_type) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def  last_inform |  |  |  |   def  last_inform | 
			
		
	
		
		
			
				
					
					|  |  |  |     Inform.where(position: self.position-1, container_id: self.course_id, container_type: 'Course') |  |  |  |     Inform.where(position: self.position-1, container_id: self.container_id, container_type: self.container_type) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   end |  |  |  |   end | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | end |  |  |  | end | 
			
		
	
	
		
		
			
				
					|  |  | 
 |