mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 15:06:35 +02:00
Rails4: replace deprecated find_all_by_* at WikiPage model
git-svn-id: http://svn.redmine.org/redmine/trunk@12515 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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.find_all_by_title(title).each(&:destroy)
|
||||
wiki.redirects.where(:title => title).all.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
|
||||
|
||||
Reference in New Issue
Block a user