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

.clone() should reset :created_at

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

      Consider:

      1.9.2-p290 :001 > MyModel.first.clone.created_at
       => 2012-06-06 13:46:25 -0500
      1.9.2-p290 :002 > MyModel.new.created_at
       => nil
      

      If the model includes Mongoid::Timestamps, clone() should set created_at and updated_at to nil, so it is set when the object is persisted

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

              Created:
              Updated:
              Resolved: