开发者

Rails Cookie detection?

开发者 https://www.devze.com 2023-01-18 22:10 出处:网络
Hi i\'m newbie with rails amd just realized that my Rails App that i created with a beginner tutorial needs cookies to work properly, otherwise after submiting a form it gives the error ActionControll

Hi i'm newbie with rails amd just realized that my Rails App that i created with a beginner tutorial needs cookies to work properly, otherwise after submiting a form it gives the error ActionController::InvalidAuthenticityToken.

How can i implement in an开发者_Python百科 easy way a cookie detection?


InvalidAuthenticityToken means that you're not sending the correct CSRF token with your form. You should be building your form with the built-in Rails methods. These cause a hidden authenticity_token input to be inserted into your form. Rails will verify the authenticity_token when the form is submitted.

What leads you to believe that 'cookie detection' is part of the problem?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号