Module: ReactOnRails::Pro::Utils
- 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
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/react_on_rails/pro/utils.rb', line 28 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
24 25 26 |
# File 'lib/react_on_rails/pro/utils.rb', line 24 def self.support_pro_features? ReactOnRails::Utils.react_on_rails_pro_licence_valid? end |