Grape/Rails API Cross-Origin Resource Sharing
If you want to allow access to your Grape API from other domains, you need to implement CORS!
It’s easy with the rack-cors gem. Here’s how you do it.
Add rack-cors to your gemfile.
gem 'rack-cors', :require => 'rack/cors'
Then go to your application.rb and add:
[gist id="4297940"]https://gist.github.com/4297940
done!