mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
implement suggestions from static code analysis tools
This commit is contained in:
parent
bb5f668497
commit
e89358dacc
21 changed files with 252 additions and 121 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue