Permalink
Browse files

sort all the things

  • Loading branch information...
Leo Martel
Leo Martel committed Sep 26, 2014
1 parent 54c887b commit ba138bbba0fa4ddde4b2be199dd3c5f514f4972d
Showing with 1 addition and 1 deletion.
  1. +1 −1 app.rb
View
2 app.rb
@@ -173,7 +173,7 @@ class TrackTracker < Sinatra::Base
end
get '/requirements.json/:id' do |req_id|
Requirement[req_id.to_i].courses.sort_by { |c| c.number.to_i }.map { |c|
Requirement[req_id.to_i].courses.sort_by { |c| [c.department.abbreviation, c.number.to_i] }.map { |c|
dept = c.department.abbreviation
num = c.number
%Q(#{dept}#{num}: <a href="/courses/#{dept.downcase}/#{num.downcase}">#{pp c}</a> [#{pp_units c} units])

0 comments on commit ba138bb

Please sign in to comment.