Module: React::Rails::ControllerLifecycle::ClassMethods

Defined in:
lib/react/rails/controller_lifecycle.rb

Instance Method Summary collapse

Instance Method Details

#per_request_react_rails_prerendererObject

Call this in the controller to check out a prerender for the whole request. You can access the renderer with React::Rails::ControllerLifecycle#react_rails_prerenderer.



18
19
20
21
# File 'lib/react/rails/controller_lifecycle.rb', line 18

def per_request_react_rails_prerenderer
  around_action_with_fallback = respond_to?(:around_action) ? :around_action : :around_filter
  public_send(around_action_with_fallback, :per_request_react_rails_prerenderer)
end