Commit 0852502
authored
Do not enable debug tools for lib templates (#45)
## Problem statement
When using `reactionview` with the `intercept_erb` and `debug` options,
one can get warnings for templates that are outside one's control.
Here's an example with the [Avo ](https://github.com/avo-hq/avo)
dashboard in one of my apps:
<img width="2726" height="1776" alt="CleanShot 2025-10-10 at 15 37
01@2x"
src="https://github.com/user-attachments/assets/0b4905ce-c338-4254-af1d-e84b06764418"
/>
The problem has also been described in
#43
## Proposed solution
The proposed change here only allows debug for "local" templates, i.e.
templates rendered from the main app `app/views` directory.
## Potential shortcomings
The solution proposed only works for templates inside
`"#{Rails.root}/app/views"`.
It means that should an app use local engines, the engine templates will
not benefit from ReActionView debug tools.
One potential solution would be to add a new configuration item that
would basically be an allow-list for other template paths within the
app.
Resolves #431 parent 02289fc commit 0852502
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
0 commit comments