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

Docs: Clarify accepts_nested_attributes_for vs. autosave behavior

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Docs
    • Labels:
      None

      Follow-up from MONGOID-4484

      Based on this discussion: https://github.com/mongodb/mongoid/pull/5225#discussion_r851727093

      we should clarify docs/reference/associations.txt

      • Does accepts_nested_attributes_for coerce autosave: true on the association itself?
      • What if you also explicitly set autosave: false?
      • Or does the autosave only happen at runtime when passing in :album_attributes as a parameter to new / assign_attributes?

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: