Improve GlobalID::Identification usage with associations

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Associations
    • None
    • None
    • None
    • None
    • None
    • None

      GlobalID::Identification is used in rails to serialize any record with an id method and find class method, which is the case of classes including Mongoid::Document.

      The benefit of including GlobalID::Identification would be e.g. that you can directly use documents with ActiveJob.

      I already included the module in my own project and it doesn't seem to pose any problem. It is also pretty straightforward:

      lib/mongoid/railtie.rb

      module Mongoid::Document
        include GlobalID::Identification
      end
      

              Assignee:
              Unassigned
              Reporter:
              Aethelflaed [X]
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: