belongs_to :name, class_name: '::SomeClass' raises an exception

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0.rc0, 7.0.4
    • Affects Version/s: 7.0.3
    • Component/s: Associations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Following the rework of the `:class_name` option in v7.0.3, a value of '::SomeClass' causes a NameError exception. GitHub PR #4640 fixes it so it works again (as it did in 7.0.2 and prior).

      Example:
      class Child
        include Mongoid::Document
        belongs_to :parent, class_name: '::OtherClass'
      {{ end}}

              Assignee:
              Oleg Pudeyev (Inactive)
              Reporter:
              thomas morgan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: