Sha256: 800227f0082b2a7cdff59ea8987e6ec885e398297acc4e67c39b43335268fca1
Contents?: true
Size: 466 Bytes
Versions: 18
Compression:
Stored size: 466 Bytes
Contents
require 'action_controller' module ReactiveRuby module Rails class ActionController::Base def render_component(*args) @component_name = ((args[0].is_a? Hash) || args.empty?) ? params[:action].camelize : args.shift @render_params = (args[0].is_a? Hash) ? args[0] : {} render inline: "<%= react_component @component_name, @render_params, { prerender: !params[:no_prerender] } %>", layout: 'application' end end end end
Version data entries
18 entries across 18 versions & 2 rubygems