问题
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