diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index c681147ee..86b3fb15d 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -87,7 +87,7 @@ class WikiPage < ActiveRecord::Base r.title == r.redirects_to ? r.destroy : r.save end # Remove redirects for the new title - wiki.redirects.where(:title => title).all.each(&:destroy) + wiki.redirects.where(:title => title).each(&:destroy) # Create a redirect to the new title wiki.redirects << WikiRedirect.new(:title => @previous_title, :redirects_to => title) unless redirect_existing_links == "0" @previous_title = nil