Let’s have a method called
show_a in the first controller and method
show_b in the second controller that look like this:
# first_controller.rb class FirstController < ApplicationController def show_a render :show end end # second_controller.rb class SecondController < ApplicationController def show_b redirect_to(first_show_a_url) end end
Then when I navigate to route for the
first_controller#show_a everything works as expected. But when I navigate to the
second_controller#show_b using Turbo link with
turbo:render and other events are fired twice and neither of them is for the cached preview. It also initializes my Stimulus controllers twice.
Any ideas what could cause that please?