Sha256: 9fe82aa578c72e0eea9e02e7d7aad86271383d4dce7ea38073ca61afd4b36ef8
Contents?: true
Size: 799 Bytes
Versions: 56
Compression:
Stored size: 799 Bytes
Contents
# frozen_string_literal: true require "connection_pool" require_relative "server_rendering_pool/ruby_embedded_java_script" # Based on the react-rails gem. # None of these methods should be called directly. module ReactOnRails module ServerRenderingPool class << self def pool @pool ||= if ReactOnRails::Utils.react_on_rails_pro? ReactOnRailsPro::ServerRenderingPool::ProRendering else ReactOnRails::ServerRenderingPool::RubyEmbeddedJavaScript end end delegate :reset_pool_if_server_bundle_was_modified, :reset_pool, to: :pool def server_render_js_with_console_logging(js_code, render_options) pool.exec_server_render_js(js_code, render_options) end end end end
Version data entries
56 entries across 56 versions & 1 rubygems