Skip to content

Commit b5d4b2c

Browse files
committed
Clarify README examples to explain rendering inline partials multiple times
1 parent 3bf3cbe commit b5d4b2c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ You can define a reusable ERB partial directly in your view:
3131
<p>Foo content</p>
3232
<% end %>
3333
34+
<%= render_inline_partial :foo %>
3435
<%= render_inline_partial :foo %>
3536
```
3637

37-
This example defines a partial template named `:user_row`. You can define inline partials with **any name**, using either a **symbol** or a **string**.
38+
The same inline partial can be rendered multiple times within the same view.
39+
40+
You can define inline partials with **any name**, using either a **symbol** or a **string**. This example defines a partial template named `:user_row`:
3841

3942
```erb
4043
<% inline_partial(:user_row) do |user| %>

0 commit comments

Comments
 (0)