summaryrefslogtreecommitdiffstats
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-07 22:33:25 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-07 22:33:25 +0000
commit8db1cdd6f138ac0901a35b4b1a2ced7cf346095a (patch)
tree275ea855b588199effb01e729cb438aa7e265c65 /app/models/project.rb
parentfd4a91130465f6b5ae4fc937da13e8674ee4d4de (diff)
downloadredmine-8db1cdd6f138ac0901a35b4b1a2ced7cf346095a.tar.gz
redmine-8db1cdd6f138ac0901a35b4b1a2ced7cf346095a.zip
Deprecates Project#set_allowed_parent!.
git-svn-id: http://svn.redmine.org/redmine/trunk@13849 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index deb497484..fa035b022 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -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)