Skip to content

Commit 31501dc

Browse files
claudejustin808
authored andcommitted
Remove explicitly_disabled_pro_options from RenderOptions
Simplify RenderOptions initialization by: - Removing @explicitly_disabled_pro_options instance variable - Removing explicitly_disabled_pro_options from attr_reader - Directly assigning the result of disable_pro_render_options_if_not_licensed This completes the removal of the tracking mechanism for disabled pro options, as this information is no longer needed without the warning badge.
1 parent 67dcc23 commit 31501dc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/react_on_rails/react_component/render_options.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ class RenderOptions
1515
# TODO: remove the required for named params
1616
def initialize(react_component_name: required("react_component_name"), options: required("options"))
1717
@react_component_name = react_component_name.camelize
18-
19-
result = ReactOnRails::ProUtils.disable_pro_render_options_if_not_licensed(options)
20-
@options = result[:raw_options]
21-
@explicitly_disabled_pro_options = result[:explicitly_disabled_pro_options]
18+
@options = ReactOnRails::ProUtils.disable_pro_render_options_if_not_licensed(options)
2219
end
2320

24-
attr_reader :react_component_name, :explicitly_disabled_pro_options
21+
attr_reader :react_component_name
2522

2623
def throw_js_errors
2724
options.fetch(:throw_js_errors, false)

0 commit comments

Comments
 (0)