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

Little refactoring of BSON::ObjectId.convert

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12_01_17
    • Component/s: None
    • Labels:
      None

      Description

      I don't know if you think this refactoring is good enough or not. But it's just a start.

      The BSON::ObjectId.convert method can take a lot of type in params. I extract all of type managed by this method in several method. With this refactoring, the code is a little cleaner.

      I add documentation about the third args reject_blank pass on this method. There are no documentation before.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: