Skip to content

Commit

Permalink
Merge branch 'main' into reduce_unbound_allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron authored Oct 18, 2023
2 parents e5cbd19 + f087bcf commit 755df13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Vale
uses: errata-ai/vale-action@d074f98809cbae059386851971544a281fd9f593
uses: errata-ai/vale-action@c99f2dfd2aeaedb3d4bb16f385841830b9164d31
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
markdown:
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ nav_order: 5

Rainer Borene

* Update generators.md to clarify the way of changing `config.view_component.view_component_path`.

*Shozo Hatta*

* Improve docs about inline templates interpolation

*Hans Lemuet*
Expand Down
8 changes: 7 additions & 1 deletion docs/guide/generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ bin/rails generate component Sections::Example title content

You can specify options when running the generator. To alter the default values project-wide, define the configuration settings described in [API docs](/api.html#configuration).

Generated ViewComponents are added to `app/components` by default. Set `config.view_component.view_component_path` to use a different path.
Generated ViewComponents are added to `app/components` by default. Set `config.view_component.view_component_path` to use a different path. Note that you need to add the same path to `config.eager_load_paths` as well.

```ruby
# config/application.rb
config.view_component.view_component_path = "app/views/components"
config.eager_load_paths << Rails.root.join("app/views/components")
```

### Override template engine

Expand Down

0 comments on commit 755df13

Please sign in to comment.