Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails RoutingError (No route matches [OPTIONS]

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.

like image 942
kendotwill Avatar asked Aug 31 '14 03:08

kendotwill


1 Answers

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

like image 58
trosborn Avatar answered Oct 30 '22 22:10

trosborn