You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
render_preview can pass parameters to preview (#1499)
* remove experimental tag
* move render_preview docs down
* update docs to reference more reliable `m` command
* `render_preview` can pass parameters to preview
* linters
Copy file name to clipboardExpand all lines: docs/guide/previews.md
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,26 @@ Then access the resulting previews at:
32
32
33
33
_For a more interactive experience, consider using [Lookbook](https://github.com/allmarkedup/lookbook) or [ViewComponent::Storybook](https://github.com/jonspalmer/view_component_storybook)._
34
34
35
+
## Passing parameters
36
+
37
+
Set dynamic values from URL parameters by setting them as arguments:
Copy file name to clipboardExpand all lines: docs/guide/slots.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ end
147
147
148
148
## Referencing slots
149
149
150
-
As the content passed to slots is registered after a component is initialized, it cannot referenced in an initializer. One way to reference slot content is using the `before_render`[lifecycle method](/guide/lifecycle):
150
+
As the content passed to slots is registered after a component is initialized, it can't be referenced in an initializer. One way to reference slot content is using the `before_render`[lifecycle method](/guide/lifecycle):
0 commit comments