Skip to content

Commit 9ea9b11

Browse files
committed
Component Registry
1 parent 2435ae2 commit 9ea9b11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/getting-started/quick-start.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,13 +886,14 @@ touch app/matestack/components/registry.rb
886886
```ruby
887887
module Components::Registry
888888

889-
def post_component(post)
889+
def post_component(post:)
890890
Components::Post.(post: post)
891891
end
892892

893893
end
894894
```
895895

896+
* [x] Adjust the index page to include the Components::Registry
896897
* [x] Adjust the index page in order to use the component in the new way
897898

898899
`app/matestack/twitter_clone/posts/index.rb`
@@ -901,6 +902,8 @@ end
901902
```ruby
902903
class TwitterClone::Pages::Posts::Index < Matestack::Ui::Page
903904

905+
include Components::Registry
906+
904907
def prepare
905908
@posts = Post.all
906909
end

0 commit comments

Comments
 (0)