Module: InertiaRails::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/inertia_rails/controller.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #default_render ⇒ Object
- #inertia_meta ⇒ Object
-
#inertia_share(**props, &block) ⇒ Object
Instance-level inertia_share for use in before_action callbacks.
- #redirect_to(options = {}, response_options = {}) ⇒ Object
Instance Method Details
#default_render ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/inertia_rails/controller.rb', line 67 def default_render if inertia_configuration.default_render render(inertia: true) else super end end |
#inertia_meta ⇒ Object
80 81 82 |
# File 'lib/inertia_rails/controller.rb', line 80 def @inertia_meta ||= InertiaRails::MetaTagBuilder.new(self) end |
#inertia_share(**props, &block) ⇒ Object
Instance-level inertia_share for use in before_action callbacks
61 62 63 64 65 |
# File 'lib/inertia_rails/controller.rb', line 61 def inertia_share(**props, &block) @_inertia_shared ||= [] @_inertia_shared << props.freeze unless props.empty? @_inertia_shared << block if block end |
#redirect_to(options = {}, response_options = {}) ⇒ Object
75 76 77 78 |
# File 'lib/inertia_rails/controller.rb', line 75 def redirect_to( = {}, = {}) () super end |