From 54d553b27f938f2e5492b656f692a19147654097 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 7 Oct 2011 23:53:49 +0000 Subject: [PATCH] Rails3: model: replace deprecated errors.add_to_base at validate_issue_relation of IssueRelation git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7616 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue_relation.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb index d359b1ddf..854e4255b 100644 --- a/app/models/issue_relation.rb +++ b/app/models/issue_relation.rb @@ -71,11 +71,11 @@ class IssueRelation < ActiveRecord::Base errors.add :issue_to_id, :not_same_project unless issue_from.project_id == issue_to.project_id || Setting.cross_project_issue_relations? #detect circular dependencies depending wether the relation should be reversed if TYPES.has_key?(relation_type) && TYPES[relation_type][:reverse] - errors.add_to_base :circular_dependency if issue_from.all_dependent_issues.include? issue_to + errors.add :base, :circular_dependency if issue_from.all_dependent_issues.include? issue_to else - errors.add_to_base :circular_dependency if issue_to.all_dependent_issues.include? issue_from + errors.add :base, :circular_dependency if issue_to.all_dependent_issues.include? issue_from end - errors.add_to_base :cant_link_an_issue_with_a_descendant if issue_from.is_descendant_of?(issue_to) || issue_from.is_ancestor_of?(issue_to) + errors.add :base, :cant_link_an_issue_with_a_descendant if issue_from.is_descendant_of?(issue_to) || issue_from.is_ancestor_of?(issue_to) end end -- 2.39.5