Skip to content

Commit

Permalink
Merge pull request #472 from commercekitchen/develop
Browse files Browse the repository at this point in the history
Alphabetized schools list
  • Loading branch information
tmichaelreis authored Aug 3, 2020
2 parents d4753eb + 36afd66 commit b768448
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/ajax/schools_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ class SchoolsController < ApplicationController
skip_after_action :verify_policy_scoped, only: :index

def index
@schools = current_organization.schools.where(school_type: params[:school_type]).enabled
@schools = current_organization.schools
.where(school_type: params[:school_type])
.enabled
.order(School.arel_table['school_name'].lower.asc)
render json: @schools
end

Expand Down

0 comments on commit b768448

Please sign in to comment.