Skip to content

Commit

Permalink
Ordering Kanji is not that easy
Browse files Browse the repository at this point in the history
  • Loading branch information
Calyhre committed May 20, 2017
1 parent 2d6b15d commit e18219e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ class Game < ApplicationRecord
order(order_by.join(' '))
}

scope :by_game_code, -> { order('LOWER(title)').order_by_region.group_by(&:game_code) }
scope :by_region, -> { order('LOWER(title)').order_by_region.group_by(&:region) }
scope :by_game_code, -> { order_by_region.order('LOWER(title)').group_by(&:game_code) }
scope :by_region, -> { order_by_region.order('LOWER(title)').group_by(&:region) }
end

0 comments on commit e18219e

Please sign in to comment.