Skip to content

Commit 3f4d521

Browse files
committed
Readme
1 parent 4e5097c commit 3f4d521

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## 4.0.0
4+
5+
* Added gon.watch functionality (thanks to @brainopia and @kossnocorp)
6+
* Compatibility with jbuilder paths for partial! method
7+
* Fixed some bugs
8+
* Little bit refactoring - Gon now is a class
9+
310
## 3.0.3
411

512
* Include ActionView::Helpers into Gon::JBuilder

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
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!
99

10+
Now you can easily renew data in your variables through ajax with [gon.watch](https://github.com/gazay/gon/wiki/Usage-gon-watch)!
11+
1012
With [Jbuilder](https://github.com/rails/jbuilder) and [Rabl](https://github.com/nesquena/rabl) support!
1113

1214
For Sinatra available [gon-sinatra](https://github.com/gazay/gon-sinatra).
@@ -50,6 +52,11 @@ gem line to your Gemfile and do the following:
5052

5153
3. profit?
5254

55+
With `gon.watch` feature you can easily renew data in gon variables!
56+
Just pass option `:watch => true` to `include_gon` method and call
57+
`gon.watch` from your js file. It's super useful in modern web
58+
applications!
59+
5360
## Usage
5461
5562
### More details about configuration and usage you can find in [gon wiki](https://github.com/gazay/gon/wiki)
@@ -97,6 +104,17 @@ alert(gon.your_array)
97104
alert(gon.your_hash)
98105
```
99106
107+
## gon.watch - renew your data easily!
108+
109+
You can use gon for renewing your data without reloading pages and
110+
writing long js functions! It's really
111+
great for some live values.
112+
113+
Supports `gon.watch.rabl` and `gon.watch.jbuilder` usage.
114+
115+
[Instruction](https://github.com/gazay/gon/wiki/Usage-gon-watch) for
116+
usage gon.watch.
117+
100118
## Usage with Rabl
101119

102120
You can write your variables assign logic to templates with [Rabl](https://github.com/nesquena/rabl).

0 commit comments

Comments
 (0)