mardi 31 juillet 2018

Skipping skip_before_action :verify_authenticity_token

Rails 3.2

I am trying to do some maintenance on a Rails 3.2 application, and added an API controller.

To avoid getting an invalid CSRF warning, I would like to switch off verification of the authenticity token.

I added the following to the API controller:

skip_before_action :verify_authenticity_token

But I am getting the following error message:

undefined method `skip_before_action' for Api::TicketsController:Class (NoMethodError)

Any ideas?

Aucun commentaire:

Enregistrer un commentaire