Remove indirection.
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jul 2017 12:42:39 +0000 (13:42 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 12 Jul 2017 12:42:39 +0000 (13:42 +0100)
app/controllers/issues_controller.rb
app/views/issues/show.html.erb

index 9b59a8f..63228c7 100644 (file)
@@ -60,8 +60,6 @@ class IssuesController < ApplicationController
     @unread_reports = @issue.unread_reports
     @comments = @issue.comments
     @related_issues = @issue.reported_user.issues.where(:issue_type => @user_role)
-
-    @updated_by_admin = User.find(@issue.updated_by) if @issue.updated_by
   end
 
   def new
index e97479b..e9d68d2 100644 (file)
@@ -3,7 +3,7 @@
 <p><%= report_type(@issue.reportable_type) %> : <%= reportable_url(@issue.reportable) %></p>
 <p class="deemphasize">
   <small>
-    <%= @issue.reports.count %> reports | First reported: <%= l @issue.created_at.to_datetime, :format => :friendly %>  <%= "| Last resolved at #{l(@issue.resolved_at.to_datetime, :format =>:friendly)}" if @issue.resolved_at? %> <%= "| Last updated at #{l(@issue.updated_at.to_datetime, :format => :friendly)} by #{@updated_by_admin.display_name}" if @updated_by_admin %>
+    <%= @issue.reports.count %> reports | First reported: <%= l @issue.created_at.to_datetime, :format => :friendly %>  <%= "| Last resolved at #{l(@issue.resolved_at.to_datetime, :format =>:friendly)}" if @issue.resolved_at? %> <%= "| Last updated at #{l(@issue.updated_at.to_datetime, :format => :friendly)} by #{@issue.user_updated.display_name}" if @issue.user_updated %>
   </small>
 </p>
 <p>