From 4aa0c97275541dda2b6e01c8aaea5761e52b0560 Mon Sep 17 00:00:00 2001 From: Liam Morley Date: Thu, 7 Oct 2021 14:54:00 -0400 Subject: [PATCH] Rename browse controller to sqm categories controller --- .../{browse_controller.rb => sqm_categories_controller.rb} | 2 +- app/views/{browse => sqm_categories}/_gauge_graph.html.erb | 0 app/views/{browse => sqm_categories}/show.html.erb | 0 config/routes.rb | 2 +- spec/views/{browse => sqm_categories}/show.html.erb_spec.rb | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename app/controllers/{browse_controller.rb => sqm_categories_controller.rb} (77%) rename app/views/{browse => sqm_categories}/_gauge_graph.html.erb (100%) rename app/views/{browse => sqm_categories}/show.html.erb (100%) rename spec/views/{browse => sqm_categories}/show.html.erb_spec.rb (98%) diff --git a/app/controllers/browse_controller.rb b/app/controllers/sqm_categories_controller.rb similarity index 77% rename from app/controllers/browse_controller.rb rename to app/controllers/sqm_categories_controller.rb index e7788390..05717b4b 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/sqm_categories_controller.rb @@ -1,4 +1,4 @@ -class BrowseController < SqmApplicationController +class SqmCategoriesController < SqmApplicationController def show @category = CategoryPresenter.new( diff --git a/app/views/browse/_gauge_graph.html.erb b/app/views/sqm_categories/_gauge_graph.html.erb similarity index 100% rename from app/views/browse/_gauge_graph.html.erb rename to app/views/sqm_categories/_gauge_graph.html.erb diff --git a/app/views/browse/show.html.erb b/app/views/sqm_categories/show.html.erb similarity index 100% rename from app/views/browse/show.html.erb rename to app/views/sqm_categories/show.html.erb diff --git a/config/routes.rb b/config/routes.rb index 939b60d2..a9d8f7b4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ Rails.application.routes.draw do resources :districts do resources :schools, only: [:index, :show] do resources :dashboard, only: [:index] - resources :browse, only: [:show] + resources :sqm_categories, only: [:show], path: 'browse' end end diff --git a/spec/views/browse/show.html.erb_spec.rb b/spec/views/sqm_categories/show.html.erb_spec.rb similarity index 98% rename from spec/views/browse/show.html.erb_spec.rb rename to spec/views/sqm_categories/show.html.erb_spec.rb index 6ce1ab30..4f6a7d5f 100644 --- a/spec/views/browse/show.html.erb_spec.rb +++ b/spec/views/sqm_categories/show.html.erb_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe 'browse/show.html.erb' do +describe 'sqm_categories/show.html.erb' do before :each do academic_year = create(:academic_year, range: '1989-90') school = create(:school, name: 'Best School')