Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Mention component rendering from controller
  • Loading branch information
florentferry committed Apr 22, 2018
1 parent 05a2df9 commit 7c9bc98
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ Then, render it in your views with the `component` helper (or its alias `c`).
= c "button"
```

Or, directly from your controllers:

```ruby
# app/controllers/pages_controller.rb

def home
render html: helpers.component("home")
end
```

Make sure to include javascript pack tag and stylesheet pack tag in your application layout file, for instance:

```slim
Expand Down

0 comments on commit 7c9bc98

Please sign in to comment.