Uniqueness not validated after ActiveRecord#dup #5953

dleavitt opened this Issue Apr 24, 2012 · 0 comments


None yet

2 participants


Failing test case:

def test_dup_validity_is_independent
  t1 = Topic.new("title" => "Literature")
  t2 = t1.dup
  t2.title = nil
  assert t2.invalid?, 'topic should be invalid'
@dleavitt dleavitt added a commit to dleavitt/rails that referenced this issue Apr 24, 2012
@dleavitt dleavitt add failing test case for #5953 2ab179a
@acapilleri acapilleri pushed a commit to acapilleri/rails that referenced this issue Apr 29, 2012
angelo giovanni capilleri ActiveRecord dup, create a new ActiveModel::Errors istance, in one co…
…mmit, fixed #5953
@acapilleri acapilleri added a commit to acapilleri/rails that referenced this issue May 15, 2012
@acapilleri acapilleri clean the errors if an object that includes validations errors is dup…
…ed,for 3-2-stable

It Fixes #5953 in 3-2-stable, it's the same pull request of #6284
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment