diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f217c098..0fc2440f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -117,4 +117,9 @@ class ApplicationController < ActionController::Base session[:usuarie_return_to] = request.fullpath end + + # Detecta si una peticiĆ³n fue hecha por HTMX + def htmx? + request.headers.key? 'HX-Request' + end end