Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1502

recursively_embeds_many with cascade_callbacks

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

      As far as i understand there is no way the create cyclic embed relations with

      Unable to find source-code formatter for language: recursively_embeds_many```. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
       method with cascading callbacks.
      The only way is to  replace single 

      recursively_embeds_many

       method call with 3 LOC like this:
      
      

      self.cyclic = true
      embeds_many cyclic_child_name, class_name: name, cyclic: true, cascade_callbacks: true
      embedded_in cyclic_parent_name, class_name: name, cyclic: true
      `

      I'm thinking about submitting a pull request with this this issue fixed, but i'm doing right thing? Maybe i just don't understand something about recursive embeds?

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

              Created:
              Updated:
              Resolved: