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

identity :type => Integer and find("123")

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.4.0
    • Affects Version/s: None
    • Component/s: None

      This is really more of a feature request. I'm using identity :type => Integer on some of my models. This works fine:

      Person.find(123)

      but this doesn't:

      Person.find("123")

      This actually comes up all the time in Rails if you do things like Person.find(params[:id]). Wouldn't it be nice if for_id() / ObjectId.convert handled this case?

            Assignee:
            Unassigned Unassigned
            Reporter:
            gurgeous Adam Doppelt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: