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
77 78 79 80 81 82 83 |
# File 'lib/inertia_rails/controller.rb', line 77 def default_render if inertia_configuration.default_render render(inertia: true) else super end end |
#inertia_meta ⇒ Object
90 91 92 |
# File 'lib/inertia_rails/controller.rb', line 90 def @inertia_meta ||= InertiaRails::MetaTagBuilder.new(self) end |
#inertia_share(**props, &block) ⇒ Object
Instance-level inertia_share for use in before_action callbacks
71 72 73 74 75 |
# File 'lib/inertia_rails/controller.rb', line 71 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
85 86 87 88 |
# File 'lib/inertia_rails/controller.rb', line 85 def redirect_to( = {}, = {}) () super end |