use locale specific order_by in simple bookmarker
don't cache a collation key for a different locale if it switches across requests test plan: * specs run refs #USERS-448 Change-Id: I411710bea4eb8755ac6fc6ad7de8e60956f081ab Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/231195 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Keith Garner <kgarner@instructure.com> Reviewed-by: Mysti Lilla <mysti@instructure.com> Reviewed-by: Jeremy Stanley <jeremy@instructure.com> QA-Review: Clint Furse <cfurse@instructure.com> Product-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
3a7027b59e
commit
14d9657901
|
@ -143,7 +143,9 @@ module BookmarkedCollection
|
|||
end
|
||||
|
||||
def order_by
|
||||
@order_by ||= Arel.sql(columns.map { |col| column_order(col) }.join(', '))
|
||||
@order_by ||= {}
|
||||
locale = defined?(Canvas::ICU) ? Canvas::ICU.locale_for_collation : :default
|
||||
@order_by[locale] ||= Arel.sql(columns.map { |col| column_order(col) }.join(', '))
|
||||
end
|
||||
|
||||
def column_order(col_name)
|
||||
|
|
Loading…
Reference in New Issue