Skip to content

Commit fcddead

Browse files
justin808claude
andcommitted
Change validation error to warning for deprecated generated_assets_dirs
- Convert from raising error to Rails.logger.warn for better UX - Clarify message to distinguish between public and private assets - Explain that private server bundles are configured separately - Maintains backward compatibility while guiding users to new config 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent eb7ed67 commit fcddead

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/react_on_rails/configuration.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,14 +308,15 @@ def configure_generated_assets_dirs_deprecation
308308
packer_public_output_path = ReactOnRails::PackerUtils.packer_public_output_path
309309

310310
msg = <<~MSG
311-
ReactOnRails Configuration Error: The 'generated_assets_dirs' configuration option is no longer supported.
312-
Since Shakapacker is now required, asset paths are automatically determined from your shakapacker.yml configuration.
311+
ReactOnRails Configuration Warning: The 'generated_assets_dirs' configuration option is no longer supported.
312+
Since Shakapacker is now required, public asset paths are automatically determined from your shakapacker.yml configuration.
313313
Please remove 'config.generated_assets_dirs' from your config/initializers/react_on_rails.rb file.
314-
Assets will be loaded from: #{packer_public_output_path}
315-
If you need to customize the output path, configure it in config/shakapacker.yml under 'public_output_path'.
314+
Public assets will be loaded from: #{packer_public_output_path}
315+
If you need to customize the public output path, configure it in config/shakapacker.yml under 'public_output_path'.
316+
Note: Private server bundles are configured separately via server_bundle_output_path.
316317
MSG
317318

318-
raise ReactOnRails::Error, msg
319+
Rails.logger.warn msg
319320
end
320321

321322
def ensure_webpack_generated_files_exists

0 commit comments

Comments
 (0)