Rails RoutingError (No route matches [OPTIONS]

最后都变了- 提交于 2019-12-18 04:35:17

问题


I'm creating a rest api using rails and making calls from a remote ember app using ember data. I'm getting this routing error on what should be a GET request. How do I create an OPTIONS method and will I have to do this for every resource?

I can provide code snippets if needed.


回答1:


Installing and configuring this gem should allow your Rails application to properly process the options request caused by CORS:

https://github.com/cyu/rack-cors



来源:https://stackoverflow.com/questions/25588699/rails-routingerror-no-route-matches-options

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!