This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,4 +17,7 @@ def default_config
1717 end
1818 end
1919 end
20+ module Hyperloop
21+ define_setting :prerendering , :on
22+ end
2023end
Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ class Railtie < ::Rails::Railtie
1010 ReactiveRuby ::Rails ::ComponentMount
1111 end
1212 config . after_initialize do
13+ ::ApplicationController . class_eval do
14+ before_action do
15+ if params . has_key? 'hyperloop-prerendering'
16+ params [ 'hyperloop-prerendering' ] . to_s == 'on'
17+ elsif params . has_key? 'hyperloop_prerendering'
18+ params [ 'hyperloop_prerendering' ] . to_s == 'on'
19+ else
20+ Hyperloop . prerendering . to_s == 'on'
21+ end && next
22+ params [ :no_prerender ] = '1'
23+ end
24+ end
1325 class ::HyperloopController < ::ApplicationController
1426 def action_missing ( name )
1527 render_component
You can’t perform that action at this time.
0 commit comments