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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 2.4.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Adam Doppelt
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: