Commit 897bc16
Fix Rails version compatibility for content_security_policy_nonce
The content_security_policy_nonce helper has different signatures across Rails versions:
- Rails 5.2-6.0: content_security_policy_nonce (no arguments)
- Rails 6.1+: content_security_policy_nonce(directive) (optional argument)
This change adds a try-catch to handle both versions gracefully.
Fixes CI failures with "wrong number of arguments (given 1, expected 0)".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 69651a5 commit 897bc16
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
448 | 457 | | |
449 | 458 | | |
450 | 459 | | |
| |||
0 commit comments