Module: TurboRouter::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/turbo_router/controller.rb
Instance Method Summary collapse
- #turbo_router_stream(template, id = :turbo_router_content, **options) ⇒ Object
- #use_dynamic_layout? ⇒ Boolean
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, **) render turbo_stream: turbo_stream.replace(id, template: template, locals: ) end |
#use_dynamic_layout? ⇒ 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 |