From f2a0e5c0ffd8f955fb35732ea6eacbbb20187e26 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Thu, 12 May 2011 11:09:19 +0200 Subject: [PATCH] Fix display of source code in review detail The problem occurs when the review relates to a violation tracked over time. --- sonar-server/src/main/webapp/WEB-INF/app/models/review.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb index dbfa303a2db..46e97ba9c95 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/review.rb @@ -24,7 +24,7 @@ class Review < ActiveRecord::Base belongs_to :project, :class_name => "Project", :foreign_key => "project_id" has_many :review_comments, :order => "created_at", :dependent => :destroy alias_attribute :comments, :review_comments - belongs_to :rule_failure, :foreign_key => 'rule_failure_permanent_id' + belongs_to :rule_failure, :foreign_key => 'rule_failure_permanent_id', :primary_key => 'permanent_id' validates_presence_of :user, :message => "can't be empty" validates_presence_of :review_type, :message => "can't be empty" -- 2.39.5