Skip to content

Commit

Permalink
Adding some config tips to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodecurnex committed Apr 21, 2011
1 parent 868f742 commit 9e8b8f8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Expand Up @@ -19,11 +19,40 @@ Roberto Decurnex (nex.development@gmail.com)
## Install

If you are using Bundler you can easily add the following line to your Gemfile:

gem 'rack-jsonp-middleware'

Or you can just install it as a ruby gem by running:

$ gem install rack-jsonp-middleware

## Configuration

### Rails 3

In your `config/application.rb` file add:

require 'rack/jsonp'

And, within the config block:

config.middleware.use Rack::JSONP

Here is an exelent example of this - [Rails 3 Configuration Example](https://github.com/rwilcox/rack_jsonp_example/commit/809c2e3d4470b694ba1a98c09f2aa07115f433e5 "Rails 3 Configuration Example")

Thank you [rwilcox](https://github.com/rwilcox "rwilcox profile")!

### Rails 2

Same as for Rails 3 but modifying the `config/environment.rb` file instead.

### Rack Apps

In your `config.ru` file add the following lines:

require 'rack/jsonp'
use Rack::JSONP

## Download

You can also clone the project with Git by running:
Expand Down

0 comments on commit 9e8b8f8

Please sign in to comment.