README.md in gon-3.0.2 vs README.md in gon-3.0.3
- old
+ new
@@ -80,10 +80,20 @@
<%= include_gon(:namespace => 'serverExports') %>
<!-- include your action js code with 'serverExports' namespace -->
...
```
+You can initialize window.gon = {}; on each request
+
+``` erb
+<head>
+ <title>some title</title>
+ <%= include_gon(:init => true) %>
+ <!-- include your action js code with 'serverExports' namespace -->
+ ...
+```
+
You can get json without script tag (kudos to @afa):
``` erb
<head>
<title>some title</title>
@@ -337,16 +347,16 @@
## Installation
Puts this line into `Gemfile` then run `$ bundle`:
``` ruby
-gem 'gon', '3.0.2'
+gem 'gon', '3.0.3'
```
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 => '3.0.2'
+config.gem 'gon', :version => '3.0.3'
```
Or manually install gon gem: `$ gem install gon`
## Contributors