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

mongoid indifferent access for hash fields

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      durran

      we are using a gem like the following. It is a life saver. It would be great if mongoid 5 can support this natively.

      https://github.com/mindscratch/mongoid-indifferent-access

      A Mongoid Hash extension enabling "indifferent access" so you can access keys using Strings or Symbols.

      BSON stores document keys as strings, so Hash keys are strings when going into MongoDB and coming out. This extension allows a developer to not worry as to whether or not the keys are Strings or Symbols. Instead, by relying on ActiveSupport all Hashes can be accessed using whichever approach suites the developer.

            Assignee:
            Unassigned Unassigned
            Reporter:
            sahin sahin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: