Module: InertiaRails::Controller

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

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#default_renderObject



60
61
62
63
64
65
66
# File 'lib/inertia_rails/controller.rb', line 60

def default_render
  if inertia_configuration.default_render
    render(inertia: true)
  else
    super
  end
end

#redirect_back(fallback_location:, allow_other_host: true, **options) ⇒ Object



73
74
75
76
77
78
79
80
# File 'lib/inertia_rails/controller.rb', line 73

def redirect_back(fallback_location:, allow_other_host: true, **options)
  capture_inertia_errors(options)
  super(
    fallback_location: fallback_location,
    allow_other_host: allow_other_host,
    **options,
  )
end

#redirect_to(options = {}, response_options = {}) ⇒ Object



68
69
70
71
# File 'lib/inertia_rails/controller.rb', line 68

def redirect_to(options = {}, response_options = {})
  capture_inertia_errors(response_options)
  super(options, response_options)
end