Rails[Rails] ActionController::InvalidAuthenticityToken when useing Rails4 as APIRails 4 作為 API 使用時出現 InvalidAuthenticityToken 的解法:在 ApplicationController 中將 protect_from_forgery 改為 with: :null_session。changeprotect_from_forgery with: :exceptiontoprotect_from_forgery with: :null_sessionin ApplicationController