我剛剛開始與Rails(作爲一個完整的新手來編碼),並且,雖然我有這個代碼的工作,我知道它會讓經驗豐富的編碼器畏縮。請幫我改寫一下。具體來說,使得第一圖像變成鏈路更好的方式來寫一個新手的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 %>
您的文章的標題應該是問題的摘要,而不是您對此的看法。在你的問題下面有一個編輯鏈接,你可以用它來選擇一個更合適的標題 – 2013-05-05 16:59:35