Skip to content

Commit 797601e

Browse files
Fix Pro helper method signatures to match core gem calls
Changed _script_content to script_content in both enhance methods since the core gem passes script_content (without underscore). Added explicit unused variable markers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b6890aa commit 797601e

File tree

1 file changed

+6
-4
lines changed
  • react_on_rails_pro/lib/react_on_rails_pro

1 file changed

+6
-4
lines changed

react_on_rails_pro/lib/react_on_rails_pro/helper.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ module Helper
2323

2424
# Enhances component script data with immediate hydration support
2525
# @param script_attrs [Hash] Base script tag attributes
26-
# @param _script_content [String] Script content (not used in current implementation)
26+
# @param script_content [String] Script content (not used in current implementation)
2727
# @param render_options [ReactOnRails::ReactComponent::RenderOptions] Render options
2828
# @return [Hash] Enhanced script attributes and additional scripts
29-
def self.enhance_component_script_data(script_attrs:, _script_content:, render_options:)
29+
def self.enhance_component_script_data(script_attrs:, script_content:, render_options:)
30+
_ = script_content # Mark as intentionally unused
3031
if render_options.immediate_hydration
3132
# Add data attribute for immediate hydration
3233
script_attrs["data-immediate-hydration"] = true
@@ -48,10 +49,11 @@ def self.enhance_component_script_data(script_attrs:, _script_content:, render_o
4849

4950
# Enhances store script data with immediate hydration support
5051
# @param script_attrs [Hash] Base script tag attributes
51-
# @param _script_content [String] Script content (not used in current implementation)
52+
# @param script_content [String] Script content (not used in current implementation)
5253
# @param redux_store_data [Hash] Redux store data including store_name and props
5354
# @return [Hash] Enhanced script attributes and additional scripts
54-
def self.enhance_store_script_data(script_attrs:, _script_content:, redux_store_data:)
55+
def self.enhance_store_script_data(script_attrs:, script_content:, redux_store_data:)
56+
_ = script_content # Mark as intentionally unused
5557
if redux_store_data[:immediate_hydration]
5658
# Add data attribute for immediate hydration
5759
script_attrs["data-immediate-hydration"] = true

0 commit comments

Comments
 (0)