Rails Cookie detection?
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?
精彩评论