Skip to content

Commit 4120efe

Browse files
authored
Merge pull request rails#54372 from Edouard-chin/ec-linkto-doc
[ci skip] Clarify the doc for creating links:
2 parents 58435c9 + 5cf188f commit 4120efe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ Let's refactor this to use these helpers:
11001100
<div id="products">
11011101
<% @products.each do |product| %>
11021102
<div>
1103-
<%= link_to product.name, product %>
1103+
<%= link_to product.name, product_path(product.id) %>
11041104
</div>
11051105
<% end %>
11061106
</div>
@@ -1147,7 +1147,7 @@ We can update `app/views/products/index.html.erb` to link to the new action.
11471147
<div id="products">
11481148
<% @products.each do |product| %>
11491149
<div>
1150-
<%= link_to product.name, product %>
1150+
<%= link_to product.name, product_path(product.id) %>
11511151
</div>
11521152
<% end %>
11531153
</div>

0 commit comments

Comments
 (0)