Permalink
Browse files

Document proper sinatra usage

  • Loading branch information...
1 parent 4bd52eb commit 453f707f583f14857cfc08046d5a5992f053f6b0 @skade skade committed Jan 11, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 README.md
View
17 README.md
@@ -5,10 +5,27 @@ If you need to send some data to your js files and you don't want to do this wit
Now with [Rabl](https://github.com/nesquena/rabl) support!
+Now with [Padrino](https://github.com/padrino/padrino-framework) support as well!
+
For rails use [gon](https://github.com/gazay/gon).
## Usage
+`my_sinatra_application.rb`
+
+``` ruby
+register Gon::Sinatra
+# and if you want to the use Rabl integration
+register Gon::Sinatra::Rabl
+
+#or, in a classy app:
+
+class MySinatraApplication < Sinatra::Base #or Padrino::Application
+ register Gon::Sinatra
+ register Gon::Sinatra::Rabl
+end
+```
+
`views/application.erb`
``` erb

0 comments on commit 453f707

Please sign in to comment.