summaryrefslogtreecommitdiffstats
path: root/app/models/issue_relation.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-10 21:59:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-10 21:59:01 +0000
commit228414f777a6ca7ce12ab21bf4bd7152b46c89c8 (patch)
tree3f081ece9fa99abbb3a938737cf4a257445e276a /app/models/issue_relation.rb
parent42b6f8365ad42613e29d546c1bfe4bc1c682f12c (diff)
downloadredmine-228414f777a6ca7ce12ab21bf4bd7152b46c89c8.tar.gz
redmine-228414f777a6ca7ce12ab21bf4bd7152b46c89c8.zip
Moved IssueRelations to IssueRelation::Relations.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10979 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_relation.rb')
-rw-r--r--app/models/issue_relation.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/app/models/issue_relation.rb b/app/models/issue_relation.rb
index 140424d00..8af56aedb 100644
--- a/app/models/issue_relation.rb
+++ b/app/models/issue_relation.rb
@@ -15,21 +15,21 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# Class used to represent the relations of an issue
-class IssueRelations < Array
- include Redmine::I18n
-
- def initialize(issue, *args)
- @issue = issue
- super(*args)
- end
-
- def to_s(*args)
- map {|relation| "#{l(relation.label_for(@issue))} ##{relation.other_issue(@issue).id}"}.join(', ')
+class IssueRelation < ActiveRecord::Base
+ # Class used to represent the relations of an issue
+ class Relations < Array
+ include Redmine::I18n
+
+ def initialize(issue, *args)
+ @issue = issue
+ super(*args)
+ end
+
+ def to_s(*args)
+ map {|relation| "#{l(relation.label_for(@issue))} ##{relation.other_issue(@issue).id}"}.join(', ')
+ end
end
-end
-class IssueRelation < ActiveRecord::Base
belongs_to :issue_from, :class_name => 'Issue', :foreign_key => 'issue_from_id'
belongs_to :issue_to, :class_name => 'Issue', :foreign_key => 'issue_to_id'