Module: ReactOnRails::ProUtils
- Defined in:
- lib/react_on_rails/pro_utils.rb
Constant Summary collapse
- PRO_ONLY_OPTIONS =
%i[immediate_hydration].freeze
Class Method Summary collapse
- .disable_pro_render_options_if_not_licensed(raw_options) ⇒ Object
-
.support_pro_features? ⇒ Boolean
Checks if React on Rails Pro features are available.
Class Method Details
.disable_pro_render_options_if_not_licensed(raw_options) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/react_on_rails/pro_utils.rb', line 13 def self.() if support_pro_features? return { raw_options: , explicitly_disabled_pro_options: [] } end = .dup = PRO_ONLY_OPTIONS.select do |option| # Use global configuration if it's not overridden in the options next ReactOnRails.configuration.send(option) if [option].nil? [option] end .each { |option| [option] = false } { raw_options: , explicitly_disabled_pro_options: } end |
.support_pro_features? ⇒ Boolean
Checks if React on Rails Pro features are available
9 10 11 |
# File 'lib/react_on_rails/pro_utils.rb', line 9 def self.support_pro_features? ReactOnRails::Utils.react_on_rails_pro? end |