1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-27 02:41:15 +00:00

Deprecates Project#set_allowed_parent!.

git-svn-id: http://svn.redmine.org/redmine/trunk@13849 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2015-01-07 22:33:25 +00:00
parent fd4a911304
commit 8db1cdd6f1

View File

@ -383,12 +383,13 @@ class Project < ActiveRecord::Base
# Sets the parent of the project with authorization check
def set_allowed_parent!(p)
ActiveSupport::Deprecation.warn "Project#set_allowed_parent! is deprecated and will be removed in Redmine 4, use #safe_attributes= instead."
p = p.id if p.is_a?(Project)
send :safe_attributes, {:project_id => p}
save
end
# Sets the parent of the project
# Sets the parent of the project and saves the project
# Argument can be either a Project, a String, a Fixnum or nil
def set_parent!(p)
if p.is_a?(Project)