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

Versioning doesn't work in a root model with embedded documents

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

      class Foo
        include Mongoid::Document
        include Mongoid::Versioning
        embeds_one :bar
      end
      
      class Bar
        include Mongoid::Document
        embedded_in :foo
      end
      

      >f=Foo.new
      >f.build_bar
      >f.save

      Creates version 1

      >f.build_bar
      >f.changed?
      => true
      >f.save

      Here is not generating a new version

            Assignee:
            durran Durran Jordan
            Reporter:
            ghost Deleted user
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: