mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
Autoformat code with rubocop
This commit is contained in:
parent
68dde8a6ef
commit
ed7a3b8a3d
43 changed files with 112 additions and 114 deletions
|
|
@ -1,6 +1,6 @@
|
|||
class CategoriesController < SqmApplicationController
|
||||
def show
|
||||
@categories = Category.sorted.map { |category| CategoryPresenter.new(category: category) }
|
||||
@categories = Category.sorted.map { |category| CategoryPresenter.new(category:) }
|
||||
|
||||
@category = CategoryPresenter.new(category: Category.find_by_slug(params[:id]))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@ class HomeController < ApplicationController
|
|||
@districts = District.all.order(:name)
|
||||
@schools = School.all.includes([:district]).order(:name)
|
||||
|
||||
@categories = Category.sorted.map { |category| CategoryPresenter.new(category: category) }
|
||||
@categories = Category.sorted.map { |category| CategoryPresenter.new(category:) }
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
class OverviewController < SqmApplicationController
|
||||
def index
|
||||
@variance_chart_row_presenters = Measure.all.map(&method(:presenter_for_measure))
|
||||
@category_presenters = Category.sorted.map { |category| CategoryPresenter.new(category: category) }
|
||||
@category_presenters = Category.sorted.map { |category| CategoryPresenter.new(category:) }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
@ -9,6 +9,6 @@ class OverviewController < SqmApplicationController
|
|||
def presenter_for_measure(measure)
|
||||
score = measure.score(school: @school, academic_year: @academic_year)
|
||||
|
||||
VarianceChartRowPresenter.new(measure: measure, score: score)
|
||||
VarianceChartRowPresenter.new(measure:, score:)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue