Skip to content

Commit 75bbcc1

Browse files
committed
Update documentation regarding pages dynamic id
1 parent bedcede commit 75bbcc1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/ui-in-pure-ruby/overview.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ end
144144
```
145145
{% endcode %}
146146

147+
Both the controller and action names will be dynamically added to the `id` attribute of the page's root element, allowing CSS rules to directly target specific pages, and tests to easily locate the page's content.
148+
149+
For example, the above controller code will result in the following HTML markup:
150+
151+
```markup
152+
<div id="matestack-page-some-controller-overview" class="matestack-page-root">
153+
<!-- page content -->
154+
</div>
155+
```
156+
147157
Learn more about Pages:
148158

149159
{% page-ref page="pages/" %}

0 commit comments

Comments
 (0)