]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/browse/bug.html.erb
Add methods to get a bug's author details from the first comment
[rails.git] / app / views / browse / bug.html.erb
index 4364d108880f2920dd04f48fe8c71ccffb64ada9..698532290f1bf8bdc77e5408f3e77f4ccf9def8e 100644 (file)
        <% end %>
        <tr>
          <th><%= t 'browse.bug.opened_by' %></th>
-         <% if @bug.comments.first.user.nil? %>
-           <td> <%= @bug.comments.first.author_name %> </td>
+         <% if @bug.author.nil? %>
+           <td> <%= @bug.author_name %> </td>
          <% else %>
-           <td><%= link_to h(@bug.comments.first.user.display_name), :controller => "user", :action => "view", :display_name => @bug.comments.first.user.display_name %></td>                                  
+           <td><%= link_to h(@bug.author_name), :controller => "user", :action => "view", :display_name => @bug.author_name %></td>
          <% end %>
        </tr>
        <tr>