Skip to content
Browse files

Merge branch 'master' of github.com:codebrew/backbone-rails

  • Loading branch information...
2 parents c3b09bd + 87aba64 commit 8fd9876c1c0348b41969d55958daf41a31d86806 Ryan Fitzgerald committed
Showing with 10 additions and 0 deletions.
  1. +10 −0 README.md
View
10 README.md
@@ -87,5 +87,15 @@ Edit your posts index view `app/views/posts/index.html.erb` with the following c
});
</script>
+If you prefer haml, this is equivalent to inserting the following code into `app/views/posts/index.html.haml`:
+
+ :javascript
+ $(function() {
+ // Blog is the app name
+ window.router = new Blog.Routers.PostsRouter({posts: #{@posts.to_json.html_safe});
+ Backbone.history.start();
+ });
+
+
Now start your server `rails s` and browse to [localhost:3000/posts](http://localhost:3000/posts)
You should now have a fully functioning single page crud app for Post models.

0 comments on commit 8fd9876

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