_destroy with accepts_nested attribute only work when _destroy key is a symbol, not when it's a string

XMLWordPrintableJSON

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

      Trying to delete an embedded object using the _destroy attribute doesn't work for nested attributes when using "_destroy", but it will work with :_destroy

      This will not delete the comment:

      article.update_attributes(comments: [{"_id" => ..., "_destroy" => "1"}])
      

      This will work, however:

      article.update_attributes(comments: [{"_id" => ..., :_destroy => "1"}])
      

              Assignee:
              Unassigned
              Reporter:
              Evan Sagge
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: