Module: Controllers::TurboFrameErrorHandling
- Extended by:
- ActiveSupport::Concern
- Included in:
- NavbarAccountController, NavbarContactController
- Defined in:
- app/concerns/controllers/turbo_frame_error_handling.rb
Overview
Include this concern in controllers that render Turbo Frame content
to provide graceful error handling instead of "Content missing".
Usage:
class MyFrameController < ApplicationController
include Controllers::TurboFrameErrorHandling
turbo_frame_id 'my-frame-id'
end
Class Method Summary collapse
-
.turbo_frame_id(frame_id) ⇒ String
Sets the DOM id of the Turbo Frame whose error partial should replace on failure.
Class Method Details
.turbo_frame_id(frame_id) ⇒ String
Sets the DOM id of the Turbo Frame whose error partial should
replace on failure.
25 26 27 |
# File 'app/concerns/controllers/turbo_frame_error_handling.rb', line 25 def turbo_frame_id(frame_id) self._turbo_frame_id = frame_id end |