OSDN Git Service

t#30328:pull porting
[pettanr/pettanr.git] / app / views / artists / list.html.erb
index 5fe1d68..124816e 100644 (file)
@@ -5,15 +5,20 @@
     <th><%= t_m 'Artist.id' -%></th>
     <th><%= t_m 'Artist.author_id' -%></th>
     <th><%= t_m 'Artist.name' -%></th>
+    <th><%= t_m 'Artist.author_id' -%></th>
     <th><%= t_m 'Artist.created_at' -%></th>
     <th><%= t_m 'Artist.updated_at' -%></th>
   </tr>
-
+  
   <% @artists.each do |artist| %>
     <tr>
       <td><%= link_to artist.id, browse_artist_path(artist) %></td>
-      <td><%= link_to artist.author_id, browse_author_path(artist.author) %></td>
       <td><%= h(truncate(artist.name, :length => 12)) %></td>
+      <td>
+        <% if artist.author_id %>
+          <%= link_to artist.author_id, browse_author_path(artist.author) %>
+        <% end %>
+      </td>
       <td><%= l artist.created_at %></td>
       <td><%= l artist.updated_at %></td>
     </tr>