summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-23 16:18:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-07-23 16:18:27 +0000
commitc1e7146498b457c085415d67ba55922aed1b8c13 (patch)
tree31ef0fd936e3b313a8570daef0afd7d08552952e
parent4f10dc20e6600b907f97a0beada77b9193250bde (diff)
downloadredmine-c1e7146498b457c085415d67ba55922aed1b8c13.tar.gz
redmine-c1e7146498b457c085415d67ba55922aed1b8c13.zip
Removes deprecated methods.
git-svn-id: http://svn.redmine.org/redmine/trunk@16871 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/project.rb13
-rw-r--r--app/models/role.rb7
-rw-r--r--app/models/tracker.rb7
3 files changed, 2 insertions, 25 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 3162676b6..dc1709d84 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -421,14 +421,6 @@ class Project < ActiveRecord::Base
@allowed_parents
end
- # 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 and saves the project
# Argument can be either a Project, a String, a Fixnum or nil
def set_parent!(p)
@@ -846,11 +838,6 @@ class Project < ActiveRecord::Base
end
end
- def member_principals
- ActiveSupport::Deprecation.warn "Project#member_principals is deprecated and will be removed in Redmine 4.0. Use #memberships.active instead."
- memberships.active
- end
-
# Returns a new unsaved Project instance with attributes copied from +project+
def self.copy_from(project)
project = project.is_a?(Project) ? project : Project.find(project)
diff --git a/app/models/role.rb b/app/models/role.rb
index cdd8fd394..bf987e210 100644
--- a/app/models/role.rb
+++ b/app/models/role.rb
@@ -59,12 +59,7 @@ class Role < ActiveRecord::Base
}
before_destroy :check_deletable
- has_many :workflow_rules, :dependent => :delete_all do
- def copy(source_role)
- ActiveSupport::Deprecation.warn "role.workflow_rules.copy is deprecated and will be removed in Redmine 4.0, use role.copy_worflow_rules instead"
- proxy_association.owner.copy_workflow_rules(source_role)
- end
- end
+ has_many :workflow_rules, :dependent => :delete_all
has_and_belongs_to_many :custom_fields, :join_table => "#{table_name_prefix}custom_fields_roles#{table_name_suffix}", :foreign_key => "role_id"
has_and_belongs_to_many :managed_roles, :class_name => 'Role',
diff --git a/app/models/tracker.rb b/app/models/tracker.rb
index 9524a620c..d90ab3e15 100644
--- a/app/models/tracker.rb
+++ b/app/models/tracker.rb
@@ -27,12 +27,7 @@ class Tracker < ActiveRecord::Base
before_destroy :check_integrity
belongs_to :default_status, :class_name => 'IssueStatus'
has_many :issues
- has_many :workflow_rules, :dependent => :delete_all do
- def copy(source_tracker)
- ActiveSupport::Deprecation.warn "tracker.workflow_rules.copy is deprecated and will be removed in Redmine 4.0, use tracker.copy_worflow_rules instead"
- proxy_association.owner.copy_workflow_rules(source_tracker)
- end
- end
+ has_many :workflow_rules, :dependent => :delete_all
has_and_belongs_to_many :projects
has_and_belongs_to_many :custom_fields, :class_name => 'IssueCustomField', :join_table => "#{table_name_prefix}custom_fields_trackers#{table_name_suffix}", :association_foreign_key => 'custom_field_id'
acts_as_positioned