Commit 74cd58b
Fix: Add Rails 5.2-6.0 compatibility for compact_blank (#2058)
## Summary
Adds `require "active_support/core_ext/enumerable"` to ensure Rails
5.2-6.0 compatibility when using `compact_blank` method.
## Details
The `compact_blank` method used in
`ensure_webpack_generated_files_exists` was introduced in Rails 6.1. By
requiring the ActiveSupport core extension, we ensure this method is
available in Rails 5.2-6.0 environments.
## Changes
- Added `require "active_support/core_ext/enumerable"` at the top of
`lib/react_on_rails/configuration.rb`
- This ensures `compact_blank` is available for older Rails versions
## Testing
- All existing RSpec tests pass (54 examples in configuration_spec.rb)
- RuboCop passes with no violations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Improved webpack asset handling to dynamically include additional
bundles when the Pro features are present.
* **Bug Fix / Compatibility**
* Added a compatibility fallback for an array utility to ensure behavior
on older Rails versions.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <[email protected]>1 parent 311d3a1 commit 74cd58b
1 file changed
+28
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
3 | 21 | | |
4 | 22 | | |
5 | 23 | | |
| |||
413 | 431 | | |
414 | 432 | | |
415 | 433 | | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
423 | 444 | | |
424 | 445 | | |
425 | 446 | | |
| |||
0 commit comments