Handling Rails Authenticity Token


Handling Rails Authenticity Token

This part describes how to take care of the authenticity token problem:

I added the following code to the layout:

<%= javascript_tag "var AUTH_TOKEN #{form_authenticity_token.inspect};" if protect_against_forgery? %>

你可能感兴趣的:(JavaScript,Rails)