README.md in rails-backbone-0.5.1 vs README.md in rails-backbone-0.5.2
- old
+ new
@@ -51,12 +51,18 @@
This generator creates a router, views, templates, model and collection to create a simple crud single page app
## Example Usage
-Say we have just created a new rails 3.1 application called `blog`. Edit your gemfile and add `gem rails-backbone`.
+Created a new rails 3.1 application called `blog`.
+ rails new blog
+
+Edit your Gemfile and add
+
+ gem 'rails-backbone'
+
Install the gem and generate scaffolding.
bundle install
rails g backbone:install
rails g scaffold Post title:string content:string
@@ -71,9 +77,10 @@
<div id="posts"></div>
<script type="text/javascript">
$(function() {
+ // Blog is the app name
window.router = new Blog.Routers.PostsRouter({posts: <%= @posts.to_json.html_safe -%>});
Backbone.history.start();
});
</script>
\ No newline at end of file