The fuzzy finder in SublimeText2 is great, but if you’ve added a rails folder to your project you may see a bunch of cruft in the result list most likely due to cache files. Here’s a generic rails project file I use that keeps the fuzzy finder pretty clean.
Tagged: ruby RSS
You must be logged in to post a comment.
It’s no lie that I think highly of the potential of Cross Origin Resource Sharing. One of the great things about it is that it doesn’t take much re-wiring of existing server (or client-side) apps to start working cross domain.
Enabling your server app is as simple as including a few extra headers when you detect a cross origin request. How do you know it’s a cross origin request? You’ll see the
Origin:header — all CORS requests will have it. From there, response headers depend on the specifics of the request, but I won’t go over those here — check out the Mozilla Developer Center treatment for in-depth information.
I’ve been working with Sinatra a lot lately, so I put together an extension for Sinatra that makes enabling Cross Origin requests even easier.
sudo gem install sinatra-cross_origin
There are two ways to use the extension: globally or per-route.
For when you want to share all your endpoints cross-domain.
For when you want to share only some of your routes cross-domain.
You can mix and match app-wide config and request specific config.
Grab the source at Github: britg/sinatra-cross_origin.