Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4964

Allow passing locale parameter as symbol

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Do
    • Affects Version/s: 7.1.2
    • Fix Version/s: None
    • Component/s: Developer Experience
    • Labels:
      None
    • Environment:
      Any

      Description

      It's not a big problem but it would be nice if it would be consistent with "The Ruby way".

      MongoDB supports locale sort order for quite some time now. 

      Model.all.order_by(name: 1).collation(locale: 'sl')

      But locale option can only be passed as string. Allow it also to be passed as symbol.

      Model.all.order_by(name: 1).collation(locale: :sl)

      by
      TheR

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ther Damjan Rems
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: