An ActionController::InvalidAuthenticityToken occurred in fiche#render_field:

6 views
Skip to first unread message

Gloufy

unread,
Sep 21, 2024, 10:31:22 AM9/21/24
to ActiveScaffold : Ruby on Rails Gem
Hi Sergio,

I've a question a I've a error : An ActionController::InvalidAuthenticityToken occurred in fiche#render_field:

It's when a user fill zip code, another field (city) must be updated.

Do you know why ?

Cédric

Sergio Cambra

unread,
Sep 23, 2024, 11:24:48 AM9/23/24
to ActiveScaffold : Ruby on Rails Gem
Hi

That's a XHR POST request, so it's probably happening because the x-csrf-token
header is not in the request. Can you check the request headers with web
inspector?

The header should be added by jquery_ujs or rails_ujs automatically to all xhr
requests. Do you have one of those libraries in your application.js? What
rails version are you using?

Regards,
Sergio


Reply all
Reply to author
Forward
0 new messages