##// END OF EJS Templates
remove unneeded Relation#all from WikiPage#handle_redirects...
Toshi MARUYAMA -
r12259:143a1d8ec301
parent child
Show More
@@ -87,7 +87,7 class WikiPage < ActiveRecord::Base
87 r.title == r.redirects_to ? r.destroy : r.save
87 r.title == r.redirects_to ? r.destroy : r.save
88 end
88 end
89 # Remove redirects for the new title
89 # Remove redirects for the new title
90 wiki.redirects.where(:title => title).all.each(&:destroy)
90 wiki.redirects.where(:title => title).each(&:destroy)
91 # Create a redirect to the new title
91 # Create a redirect to the new title
92 wiki.redirects << WikiRedirect.new(:title => @previous_title, :redirects_to => title) unless redirect_existing_links == "0"
92 wiki.redirects << WikiRedirect.new(:title => @previous_title, :redirects_to => title) unless redirect_existing_links == "0"
93 @previous_title = nil
93 @previous_title = nil
General Comments 0
You need to be logged in to leave comments. Login now