README.md in gon-2.1.0 vs README.md in gon-2.1.2

- old
+ new

@@ -1,16 +1,20 @@ # Gon gem — get your Rails variables in your js ![Gon. You should try this. If you look closer - you will see an elephant.](https://github.com/gazay/gon/raw/master/doc/logo_small.png) +### Build Status ![http://travis-ci.org/gazay/gon](https://secure.travis-ci.org/gazay/gon.png) + If you need to send some data to your js files and you don't want to do this with long way through views and parsing - use this force! Now with [Jbuilder](https://github.com/rails/jbuilder) and [Rabl](https://github.com/nesquena/rabl) support! For Sinatra available [gon-sinatra](https://github.com/gazay/gon-sinatra). +For .Net MVC available port [NGon](https://github.com/brooklynDev/NGon). + ## An example of typical use ### Very good and detailed example and reasons to use is considered in [railscast](http://railscasts.com/episodes/324-passing-data-to-javascript) by Ryan Bates When you need to send some start data from your controller to your js @@ -20,11 +24,11 @@ 2. In view for this action you put this variable to some objects by data attributes, or write js right in view 3. Then there can be two ways in js: + if you previously wrote data in data attributes - you should parse this attributes and write data to some - js variable. + js variable. + if you wrote js right in view (many frontenders would shame you for that) - you just use data from this js - OK. 4. You can use your data in your js And everytime when you need to send some data from action to js you do this. @@ -281,16 +285,16 @@ ## Installation Puts this line into `Gemfile` then run `$ bundle`: ``` ruby -gem 'gon', '2.0.6' +gem 'gon', '2.1.2' ``` Or if you are old-school Rails 2 developer put this into `config/environment.rb` and run `$ rake gems:install`: ``` ruby -config.gem 'gon', :version => '2.0.6' +config.gem 'gon', :version => '2.1.2' ``` Or manually install gon gem: `$ gem install gon` ## Contributors