我刚开始使用 Rails(作为一个完全的编码新手),虽然我有这个代码可以工作,但我知道它会让有经验的编码员畏缩。请帮我更好地重写这个。具体来说,让第一张图片成为链接的一部分
<table class="table table-hover">
<tr id="topbar"><th width="60%">Name</th>
<th width="10%">Size</th>
<th width="20%">Modified</th>
<th width="5%"></th>
<th width="5%"></th></tr>
<% @folders.each do |folder| %>
<tr>
<td width="60%"><img src="https://s3-us-west-2.amazonaws.com/images/folder.gif"> <%= link_to folder.name, browse_path(folder) %></td>
<td width="10%">-</td>
<td width="20%">-</td>
<td width="5%"><%= link_to image_tag("https://s3-us-west-2.amazonaws.com/images/page_edit.gif"), rename_folder_path(folder) %></td>
<td width="5%"><%= link_to image_tag("https://s3-us-west-2.amazonaws.com/images/action_stop.gif"), folder, :confirm => 'Are you sure you want to delete the folder and all of its contents?', :method => :delete %></td>
</tr>
<% end %>