mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 15:16:21 +00:00
feat: poder detectar cuando una peticion viene de htmx
This commit is contained in:
parent
89f8022919
commit
47655c3975
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue