From 59a7dd2e774c9d81df74fafdc21aaf3b23482015 Mon Sep 17 00:00:00 2001 From: Nelson Jovel Date: Tue, 26 Mar 2024 15:36:03 -0700 Subject: [PATCH] Revert "fix: Makes visible the graphs by grade" This reverts commit 5fc83ac31b835a347f2ea2172cdeb42c6977cfe9. --- app/presenters/analyze/graph/students_by_grade.rb | 7 ++++--- app/presenters/analyze/presenter.rb | 2 +- spec/presenters/analyze/presenter_spec.rb | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/presenters/analyze/graph/students_by_grade.rb b/app/presenters/analyze/graph/students_by_grade.rb index d079bce6..c39126f8 100644 --- a/app/presenters/analyze/graph/students_by_grade.rb +++ b/app/presenters/analyze/graph/students_by_grade.rb @@ -6,9 +6,9 @@ module Analyze include Analyze::Graph::Column::Grade attr_reader :grades - # def initialize(grades:) - # @grades = grades - # end + def initialize(grades:) + @grades = grades + end def to_s "Students by Grade" @@ -52,3 +52,4 @@ module Analyze end end end + diff --git a/app/presenters/analyze/presenter.rb b/app/presenters/analyze/presenter.rb index 94ea2966..99f31288 100644 --- a/app/presenters/analyze/presenter.rb +++ b/app/presenters/analyze/presenter.rb @@ -84,7 +84,7 @@ module Analyze @graphs ||= [Analyze::Graph::AllData.new, Analyze::Graph::StudentsAndTeachers.new, Analyze::Graph::StudentsByRace.new(races: selected_races), - Analyze::Graph::StudentsByGrade.new, + Analyze::Graph::StudentsByGrade.new(grades: selected_grades), Analyze::Graph::StudentsByGender.new(genders: selected_genders), Analyze::Graph::StudentsByIncome.new(incomes: selected_incomes), Analyze::Graph::StudentsByEll.new(ells: selected_ells), diff --git a/spec/presenters/analyze/presenter_spec.rb b/spec/presenters/analyze/presenter_spec.rb index 364c364b..2c8d6984 100644 --- a/spec/presenters/analyze/presenter_spec.rb +++ b/spec/presenters/analyze/presenter_spec.rb @@ -259,7 +259,7 @@ describe Analyze::Presenter do params = { graph: "students-by-grade" } presenter = Analyze::Presenter.new(params:, school:, academic_year:) - expect(presenter.graph.to_s).to eq Analyze::Graph::StudentsByGrade.new.to_s + expect(presenter.graph.to_s).to eq Analyze::Graph::StudentsByGrade.new(grades: nil).to_s params = { graph: "students-by-gender" } presenter = Analyze::Presenter.new(params:, school:, academic_year:)