Issue with polymorphic relation

XMLWordPrintableJSON

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

      I'm trying to get two parent documents to reference the same child like so:

      class PaymentNotification
        has_many :items, as: :itemable
      end
      
      class Product
        has_many :items, as: :itemable
      end
      
      class Item
        belongs_to :itemable, polymorphic: true
      end
      

      My issue is when I save an Item to a PaymentNotification, it gets removed from the Product that it had previously belonged to (and vice versa).

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

                Created:
                Updated:
                Resolved: