Skip to content

Commit

Permalink
Merge pull request #471 from commercekitchen/alphabetic_schools
Browse files Browse the repository at this point in the history
Alphabetic schools
  • Loading branch information
tmichaelreis authored Aug 3, 2020
2 parents be2c79a + 941ebdb commit 36afd66
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 36afd66

Please sign in to comment.