remove unneeded Relation#all from WikiPage#handle_redirects
git-svn-id: http://svn.redmine.org/redmine/trunk@12534 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
95d86daef3
commit
143a1d8ec3
|
@ -87,7 +87,7 @@ class WikiPage < ActiveRecord::Base
|
||||||
r.title == r.redirects_to ? r.destroy : r.save
|
r.title == r.redirects_to ? r.destroy : r.save
|
||||||
end
|
end
|
||||||
# Remove redirects for the new title
|
# 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
|
# Create a redirect to the new title
|
||||||
wiki.redirects << WikiRedirect.new(:title => @previous_title, :redirects_to => title) unless redirect_existing_links == "0"
|
wiki.redirects << WikiRedirect.new(:title => @previous_title, :redirects_to => title) unless redirect_existing_links == "0"
|
||||||
@previous_title = nil
|
@previous_title = nil
|
||||||
|
|
Loading…
Reference in New Issue