README.md in gon-2.0.6 vs README.md in gon-2.1.0
- 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)
+
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).
## 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
you might be doing something like this:
1. Write this data in controller(presenter/model) to some variable
2. In view for this action you put this variable to some objects by data
@@ -122,10 +126,18 @@
## Usage with Rabl
Now you can write your variables assign logic to templates with [Rabl](https://github.com/nesquena/rabl).
The way of writing Rabl templates is very clearly described in their repo.
+Add Rabl to your Gemfile
+
+ `Gemfile`
+
+ ``` ruby
+ gem 'rabl'
+ ```
+
Profit of using Rabl with gon:
1. You can clean your controllers now!
2. Work with database objects and collections clearly and easyly
3. All power of Rabl
@@ -290,10 +302,10 @@
## License
The MIT License
-Copyright (c) 2011 gazay
+Copyright (c) 2011-2012 gazay
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.