Skip to content

Commit

Permalink
Reset errors before validating, this makes slug lookup happen again
Browse files Browse the repository at this point in the history
  • Loading branch information
DefV committed Dec 23, 2009
1 parent 81da0e9 commit 97f2fb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/copy_move/model.rb
Expand Up @@ -8,6 +8,7 @@ def new_slug_and_title_under(parent)
test_page.title = "#{title} Copy #{index}" test_page.title = "#{title} Copy #{index}"
test_page.slug = "#{slug}-copy-#{index}" test_page.slug = "#{slug}-copy-#{index}"
test_page.breadcrumb = test_page.title test_page.breadcrumb = test_page.title
test_page.errors.clear # Reset error status before revalidating
end end
{:slug => test_page.slug, :title => test_page.title, :breadcrumb => test_page.breadcrumb} {:slug => test_page.slug, :title => test_page.title, :breadcrumb => test_page.breadcrumb}
end end
Expand Down

0 comments on commit 97f2fb4

Please sign in to comment.