Fields from siblings in class inheritance are included in all classes

XMLWordPrintableJSON

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

      Sorry wasn't sure how to write the description, but given a class structure somewhat like this:

      class UserIdentifier
        include Mongoid::Document
        class Facebook < UserIdentifier; end
        class Email < UserIdentifier
           field :subscribed, type: Boolean, default: true
        end
      end
      
      UserIdentifier::Facebook.create.as_document #=> {"subscribed" => true}
      

      Is the fact that the field was added to a different class yet applied to all siblings/parents a bug? It definitely goes against my expectations if it's working as designed.

              Assignee:
              Durran Jordan
              Reporter:
              tal
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: