working on navigation

pull/1/head
Jared Cosulich 8 years ago
parent 36329235d0
commit b0331e2259

@ -10,7 +10,7 @@ class DistrictsController < ApplicationController
# GET /districts/1
# GET /districts/1.json
def show
@schools = @district.schools
@schools = @district.schools.alphabetic
end
# GET /districts/new

@ -7,6 +7,8 @@ class School < ApplicationRecord
validates :name, presence: true
scope :alphabetic, -> { order(name: :asc) }
include FriendlyId
friendly_id :name, :use => [:slugged]

@ -10,9 +10,17 @@
%h4
Schools in
= @district.name
%br
- @district.schools.each do |school|
%p= link_to school.name, school
%br
%br
%br
%br
= link_to "View All Districts", root_path
- else
.text-center.my-3.py-3
%h3.my-3.py-3

@ -8,16 +8,11 @@
- if true || user_signed_in?
.row.mt-3
.col-6
.col-12
%h4 Districts
- @districts.each do |district|
%p= link_to district.name, district
.col-6
%h4 Schools
-# current_user.schools.each do |school|
- School.all.each do |school|
%p= link_to school.name, school
- else

@ -145,7 +145,7 @@ namespace :data do
bad_answers = {}
year = '2017'
timeToRun = 100 * 60 * 60
timeToRun = 10 * 60
startIndex = 0
stopIndex = 100000
startTime = Time.new

Loading…
Cancel
Save