Callback after_destroy in embed doc

XMLWordPrintableJSON

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

      Hello,

      I'm using Mongoid 2.3 and Rails 3.1.1

      I have some callbacks in my embed document : After Save and After Destroy.

      The after_save seems to works good.

      But my after_destroy is never raised.

      In my Project Class :
      embeds_many :skills
      accepts_nested_attributes_for :skills, :allow_destroy => true

      In my Skill class :
      embedded_in :project
      after_destroy :delete_tank_indexes

      When I delete a skill, the skills has been deleted, but the callback is not raised...

      I have a strict implementation of this code : http://railscasts.com/episodes/197-nested-model-form-part-2

      Regards,

              Assignee:
              Unassigned
              Reporter:
              Florian95 [X]
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: