Skip to content

Commit

Permalink
Sort cohort list by first name, last name
Browse files Browse the repository at this point in the history
  • Loading branch information
benilovj committed Oct 8, 2024
1 parent da5a288 commit 57d196d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/cohorts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def index

def show
@cohort = policy_scope(Cohort).find(params[:id])
@patients = @cohort.patients.recorded
@patients =
@cohort.patients.recorded.sort_by do |patient|
[patient.first_name, patient.last_name]
end
end

private
Expand Down

0 comments on commit 57d196d

Please sign in to comment.