Sha256: 2822816cb1b81bbb96c2cb1f3f06564ed5ebc9ad38c8d118d13c00431b4c42d8

Contents?: true

Size: 656 Bytes

Versions: 1

Compression:

Stored size: 656 Bytes

Contents

module ReactiveRuby
  module Rails
    class Railtie < ::Rails::Railtie
      config.before_configuration do |app|
        app.config.assets.enabled = true
        app.config.assets.paths << ::Rails.root.join('app', 'views').to_s
        app.config.react.server_renderer =
          ReactiveRuby::ServerRendering::ContextualRenderer
        app.config.react.view_helper_implementation =
          ReactiveRuby::Rails::ComponentMount
      end
      config.after_initialize do
        class ::HyperloopController < ::ApplicationController
          def action_missing(name)
            render_component
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hyper-react-0.12.6 lib/reactive-ruby/rails/railtie.rb