Skip to content

Commit 6468acd

Browse files
committed
Clarify README and RBS documentation for inline_partial usage and parameters
1 parent d5f8d1c commit 6468acd

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## [Unreleased]
22

33
- Update README to emphasize that partial templates can be defined with **any name**
4+
- Clarify README and RBS documentation for inline_partial usage and parameters
45

56
## [0.1.1] - 2025-06-28
67

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You can define a reusable ERB partial directly in your view:
2222
<%= render_inline_partial :foo %>
2323
```
2424

25-
This example defines a partial template named `user_row`. In this way, you can define partial templates with **any name**.
25+
This example defines a partial template named `:user_row`. You can define inline partials with **any name**, using either a **symbol** or a **string**.
2626

2727
```erb
2828
<% inline_partial(:user_row) do |user| %>

sig/inline_partial.rbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module InlinePartial
33

44
module Helper
55
# パーシャルの定義(ブロック必須)
6-
def inline_partial: ((Symbol | String)?) { (*untyped) -> untyped } -> nil
6+
def inline_partial: ((Symbol | String), { (*untyped) -> untyped }) -> nil
77

8-
# collection キーワード引数に対応
9-
def render_inline_partial: (Symbol | String, *untyped, ?collection: untyped) -> untyped
8+
# objectパラメータとcollectionキーワード引数に対応
9+
def render_inline_partial: ((Symbol | String), ?untyped, ?collection: untyped) -> untyped
1010
end
1111

1212
class Railtie < Rails::Railtie

0 commit comments

Comments
 (0)