てくのろーぐ

新卒エンジニアの日常ログ

Rails

rails5APIモード以外でCORS対策

CORSとは何かという方はこちら Failed to load https://hogehoge: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://hogehoge' is there…

javascriptの値をrailsのController側に渡す

view側のjavascriptの値(textFieldや変数など)をController側に渡すためにしたことのメモです。Ajax通信をするためのjQuaryを記述 ルーティングを設定 Controller側に処理を記述 Ajax通信をするためのjQuaryを記述 $("div#source_form").click(function(){ $…