I\'m creating a set of services using Rails 4, which I am consuming with a JavaScript browser application. Cross-origin GETS are working fine, but my POSTs are failing the p
I ran into the same issue, and am currently evaluating the following routes for any possible security / performance issues. They solve the issue, but...
match '/', via: [:options],
to: lambda {|env| [200, {'Content-Type' => 'text/plain'}, ["OK\n"]]}
match '*unmatched', via: [:options],
to: lambda {|env| [200, {'Content-Type' => 'text/plain'}, ["OK\n"]]}
Despite 'match' supposedly not working in Rails 4, apparently it does work if you restrict it to a specific method.