module Revelry module Core class PropsTemplate < ActionView::Template def render(view, locals, buffer = nil, &block) # Invoke the execjs-rails lambda which makes the props for the server-side # render, but instead of rendering a template, just give me the props as a # json object Rails.application.config.execjs_rails.view_to_function_options.call(view, locals) end end end end