You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+48
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,9 @@ The preferred type of notifications can be configured with:
117
117
118
118
*`Prosopite.min_n_queries`: Minimum number of N queries to report per N+1 case. Defaults to 2.
119
119
*`Prosopite.raise = true`: Raise warnings as exceptions. Defaults to `false`.
120
+
*`Prosopite.start_raise`: Raises warnings as exceptions from when this is called. Overrides `Proposite.raise`.
121
+
*`Propsoite.stop_raise`: Disables raising warnings as exceptions if previously enabled with `Proposite.start_raise`.
122
+
*`Prosopite.local_raise?`: Returns `true` if `Prosopite.start_raise` has been called previously.
120
123
*`Prosopite.rails_logger = true`: Send warnings to the Rails log. Defaults to `false`.
121
124
*`Prosopite.prosopite_logger = true`: Send warnings to `log/prosopite.log`. Defaults to `false`.
122
125
*`Prosopite.stderr_logger = true`: Send warnings to STDERR. Defaults to `false`.
@@ -174,7 +177,52 @@ config.after_initialize do
174
177
Prosopite.rails_logger =true
175
178
end
176
179
```
180
+
In some cases you may want to configure prosopite to not raise by default and only raise in certain scenarios. In this example we scan on all controllers but also provide an API to only raise on specific actions.
0 commit comments