Permalink
Browse files

Reset errors before validating, this makes slug lookup happen again

  • Loading branch information...
1 parent 81da0e9 commit 97f2fb4fd46cdfdaf4026aaaeb7ca89714f60781 @DefV DefV committed Dec 23, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/copy_move/model.rb
@@ -8,6 +8,7 @@ def new_slug_and_title_under(parent)
test_page.title = "#{title} Copy #{index}"
test_page.slug = "#{slug}-copy-#{index}"
test_page.breadcrumb = test_page.title
+ test_page.errors.clear # Reset error status before revalidating
end
{:slug => test_page.slug, :title => test_page.title, :breadcrumb => test_page.breadcrumb}
end

0 comments on commit 97f2fb4

Please sign in to comment.