mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 19:46:23 +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
|
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
|
||||||
|
|
Loading…
Reference in a new issue