Rename association to reported_user, for clarity
[rails.git] / app / controllers / issues_controller.rb
index 763c85ef107edc2ea6542cddea82f4a916584fce..d1267fa4dbdd4082135e2c43ec33799fc6ea5559 100644 (file)
@@ -59,7 +59,7 @@ class IssuesController < ApplicationController
     @read_reports = @issue.read_reports
     @unread_reports = @issue.unread_reports
     @comments = @issue.comments
-    @related_issues = @issue.user.issues.where(:issue_type => @user_role)
+    @related_issues = @issue.reported_user.issues.where(:issue_type => @user_role)
 
     @updated_by_admin = User.find(@issue.updated_by) if @issue.updated_by
   end