我有下表,我想要我的“餐厅”的名称是可点击的并链接到该餐厅的页面。Rails链接与模型对象路径
<table class="table table-striped">
<tr>
<th>Name</th>
<th>Adress</th>
<th>City</th>
<th>No. of Recipies</th>
</tr>
<% @city.restaurants.each do |rest| %>
<tr>
<td><%= rest.name %></td>
<td><%= rest.adress %></td>
<td><%= rest.city.name %></td>
<td>5</td>
</tr>
<% end %>
我怎么会喜欢rest_path添加的东西:
<a href="url">Link text</a>
你只是把CSS放在你的链接上... – hypee 2013-05-05 16:40:22