Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from canton7/readme_usage

Clarify the README with regards to including Gon in classic applications
  • Loading branch information...
commit 483a779ea07e001cabcd44f5c854e5c078febde5 2 parents fd959dc + 1b8c004
@gazay authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 README.md
View
10 README.md
@@ -14,12 +14,16 @@ For rails use [gon](https://github.com/gazay/gon).
`my_sinatra_application.rb`
+**Note: For classic (non-modular) applications, you still have to explicitely register `Gon::Sinatra`**
+
``` ruby
-register Gon::Sinatra
+# For classic applications:
+
+Sinatra::register Gon::Sinatra
# and if you want to the use Rabl integration
-register Gon::Sinatra::Rabl
+Sinatra::register Gon::Sinatra::Rabl
-#or, in a classy app:
+# For modular applications:
class MySinatraApplication < Sinatra::Base #or Padrino::Application
register Gon::Sinatra

0 comments on commit 483a779

Please sign in to comment.
Something went wrong with that request. Please try again.