ãå¤åã«æ¼ããããã£ãã®ã§æ¸ãã¦ããã¾ãã(Ruby 1.9.3, Rails 3.2.2) Rails ã«ã¯ã»ãã·ã§ã³å¤æ° session ãããã¾ãããã¿ã¤ã ã¢ã¦ãã§ããªãã®ã«ãããä½æ ã空ã«ãªã£ã¦ãã¾ãç¾è±¡ãçºçãã¦ãããªãæ©ãã§ã¾ãããã©ãã JavaScript ã§ç´æ¥ XMLHttpRequest çºè¡ããã¨çºçããããã§ããGET ã§ã¯ãªã POST ããã¨ãã®ã¿ã®ããã§ãã 解決çã§ããããªã¯ã¨ã¹ããããã« 'X-CSRF-Token' ã追å ããã°è¯ãããã§ãã function post_xhr_request( url, param, on_ready ) { xhr = new XMLHttpRequest(); xhr.open( 'POST', url, true ); xhr.setRequestHeader( 'X-CSRF-Token', /* token
{{#tags}}- {{label}}
{{/tags}}