Setting nil on an existing belongs_to relation deletes the object

XMLWordPrintableJSON

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

      I just set a belongs_to relation to nil which deleted the related object. Is this the desired behavior?

      1. e.g this deletes the user object
        listing.user => # an existing user
        listing.user = nil

      Shouldn't this just clear the relationship, setting listing.user_id to nil?

      I'm using 2.1.7

              Assignee:
              Unassigned
              Reporter:
              Christos Pappas
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: