I am having some difficulties with `redirect_to` i...
# avo-2
c
I am having some difficulties with
redirect_to
in an action. Specifically, if I have an action like this:
Copy code
class SomeAction < Avo::BaseAction
  self.name    = "Some Action"
  self.visible = -> { view == :show }

  def handle(**args)
    models, = args.values_at(:models)

    unless models&.length == 1
      error("You must do the thing to exactly one thing at a time.")
      return
    end

    model_id = models.first.id
    target   = view_context.resources_some_model_path(model_id)

    redirect_to(main_app.something_path(target:, model_id:))
  end
end
The redirect is happening behind the scenes (I.E. entirely within the context of the Ajax request), entirely within the context of the Ajax request.
something_path
is a route that doesn't render a view, but instead redirects the user to a different site. I'm wondering if this is a corner-case involving Turbo? It doesn't happen with a route generated by Avo...
2 Views