From b5f950c7bdd8cd8638183a8b2d6fe8e58e4f751c Mon Sep 17 00:00:00 2001 From: Jared Cosulich Date: Sat, 21 Jul 2018 13:00:19 -0400 Subject: [PATCH] showing year data on school page --- app/controllers/schools_controller.rb | 2 +- app/views/layouts/_school_header.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/schools_controller.rb b/app/controllers/schools_controller.rb index 3fa3df4d..88d504fa 100644 --- a/app/controllers/schools_controller.rb +++ b/app/controllers/schools_controller.rb @@ -14,7 +14,7 @@ class SchoolsController < ApplicationController @years = @school_categories.map(&:year).map(&:to_i).sort @year = (params[:year] || @years.first).to_i @years.delete(@year) - # @school_categories.select { |sc| sc.year.to_i == @year } + # @school_categories = @school_categories.select { |sc| sc.year.to_i == @year } end def admin diff --git a/app/views/layouts/_school_header.html.haml b/app/views/layouts/_school_header.html.haml index 684e50af..2652aba2 100644 --- a/app/views/layouts/_school_header.html.haml +++ b/app/views/layouts/_school_header.html.haml @@ -8,7 +8,7 @@ Data from = "#{@year - 1}-#{@year}" school year. - - if @years.present? + -# if @years.present? %p Show year: - @years.each do |year|