5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 14:36:21 +00:00

feat: poder detectar cuando una peticion viene de htmx

This commit is contained in:
f 2024-05-20 14:12:00 -03:00
parent 89f8022919
commit 47655c3975
No known key found for this signature in database

View file

@ -117,4 +117,9 @@ class ApplicationController < ActionController::Base
session[:usuarie_return_to] = request.fullpath session[:usuarie_return_to] = request.fullpath
end end
# Detecta si una petición fue hecha por HTMX
def htmx?
request.headers.key? 'HX-Request'
end
end end