Module: TurboRouter::Controller

Extended by:
ActiveSupport::Concern
Defined in:
lib/turbo_router/controller.rb

Instance Method Summary collapse

Instance Method Details

#turbo_router_stream(template, id = :turbo_router_content, **options) ⇒ Object


36
37
38
# File 'lib/turbo_router/controller.rb', line 36

def turbo_router_stream(template, id = :turbo_router_content, **options)
  render turbo_stream: turbo_stream.replace(id, template: template, locals: options)
end

#use_dynamic_layout?Boolean

Returns:

  • (Boolean)

32
33
34
# File 'lib/turbo_router/controller.rb', line 32

def use_dynamic_layout?
  turbo_frame_request? && self.class.dynamic_layout_actions&.include?(params[:action].to_sym)
end