Files
David Heinemeier Hansson d9ebc8ace0 We need to upstream this fix to turbo-rails
If page refreshes and view transitions clash for us, they'll clash for
all.

cc: @jorgemanrubia
2025-10-29 13:47:51 +01:00

18 lines
374 B
Ruby

# FIXME: Upstream this fix to turbo-rails
module ViewTransitions
extend ActiveSupport::Concern
included do
before_action :disable_view_transitions, if: :page_refresh?
end
private
def disable_view_transitions
@disable_view_transition = true
end
def page_refresh?
request.referrer.present? && request.referrer == request.url
end
end