File: configuration.md

package info (click to toggle)
ruby-view-component 4.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,832 kB
  • sloc: ruby: 8,385; sh: 166; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 449 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---
layout: default
title: Configuration
parent: How-to guide
---

# Configuration

To configure ViewComponent, set options in `config/ENVIRONMENT.rb`:

```ruby
MyApplication.configure do
  config.view_component.instrumentation_enabled = true
  config.view_component.generate.path = "app/custom_components"
  config.view_component.previews.controller = "MyPreviewController"
end
```

For a list of available options, see [/api](/api#configuration).