Skip to content

Commit

Permalink
UGent first
Browse files Browse the repository at this point in the history
  • Loading branch information
feliciaan committed Sep 9, 2017
1 parent 89c2c20 commit 510a670
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/models/club.rb
Expand Up @@ -26,11 +26,10 @@ def name

def self.ordered_clubs
# improve speed
zeus = Club.where(internal_name: 'zeus').first
ugent = Club.where(internal_name: 'ugent').first
ugent = Club.find_by_internal_name 'ugent'

# ordering like it's 1999
clubs = Club.except(zeus).except(ugent).sort_by {|c| c.name}
[zeus, ugent] + clubs
clubs = Club.except(ugent).sort_by {|c| c.name}
[ugent] + clubs
end
end

0 comments on commit 510a670

Please sign in to comment.