Sha256: 2e57cb38667c84e325d3fb008b8c4bded460b5be0e6e5704cb6e1196613650ee

Contents?: true

Size: 548 Bytes

Versions: 8

Compression:

Stored size: 548 Bytes

Contents

class React::Rails::ControllerRenderer
  include React::Rails::ViewHelper
  include ActionView::Helpers::TagHelper
  include ActionView::Helpers::TextHelper

  attr_accessor :output_buffer

  def initialize(options={})
    controller = options[:controller]
    @__react_component_helper = controller.__react_component_helper
  end

  def call(name, options, &block)
    props = options.fetch(:props, {})
    options = options.slice(:data, :aria, :tag, :class, :id).merge(prerender: true)
    react_component(name, props, options, &block)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
react-rails-1.7.2 lib/react/rails/controller_renderer.rb
react-rails-1.7.1 lib/react/rails/controller_renderer.rb
react-rails-1.7.0 lib/react/rails/controller_renderer.rb
react-rails-1.6.2 lib/react/rails/controller_renderer.rb
react-rails-1.6.1 lib/react/rails/controller_renderer.rb
react-rails-1.6.0 lib/react/rails/controller_renderer.rb
react-rails-1.5.0 lib/react/rails/controller_renderer.rb
react-rails-1.4.2 lib/react/rails/controller_renderer.rb