implement suggestions from static code analysis tools

This commit is contained in:
rebuilt 2022-07-12 19:15:54 -07:00
parent bb5f668497
commit e89358dacc
21 changed files with 252 additions and 121 deletions

View file

@ -2,6 +2,7 @@
class OverviewController < SqmApplicationController
before_action :check_empty_dataset, only: [:index]
before_action :response_rate_timestamp, only: [:index]
helper VarianceHelper
def index
@ -31,4 +32,14 @@ class OverviewController < SqmApplicationController
def subcategories
@subcategories ||= Subcategory.all
end
def response_rate_timestamp
@response_rate_timestamp = begin
rate = ResponseRate.where(school: @school,
academic_year: @academic_year).order(updated_at: :DESC).first || Today.new
rate.updated_at
end
@response_rate_timestamp
end
end