Consolidate time periods methods into base measure (#30757)
This commit is contained in:
		
					parent
					
						
							
								80743e0e7f
							
						
					
				
			
			
				commit
				
					
						a8b3d2e4e4
					
				
			
		
					 11 changed files with 2 additions and 82 deletions
				
			
		|  | @ -49,14 +49,6 @@ class Admin::Metrics::Measure::InstanceFollowersMeasure < Admin::Metrics::Measur | |||
|     SQL | ||||
|   end | ||||
| 
 | ||||
|   def time_period | ||||
|     (@start_at.to_date..@end_at.to_date) | ||||
|   end | ||||
| 
 | ||||
|   def previous_time_period | ||||
|     ((@start_at.to_date - length_of_period)..(@end_at.to_date - length_of_period)) | ||||
|   end | ||||
| 
 | ||||
|   def params | ||||
|     @params.permit(:domain, :include_subdomains) | ||||
|   end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue