-
marionette-rails
-
haml_coffee_assets, execjs
-
Backbone.js, Underscore.js, json2
-
Backbone.Marionette
-
Backbone.StickIt (two-way binding)
-
Backbone.Validation
-
backbone_rails_sync (from rails-backbone gem, patches Backbone.sync method for better integration with Rails)
-
Sugar.js (Ruby-like JS core extension)
-
move javascript_include_tag to be just before </body>
-
to pre-load data, put a script tag at end of body. Example to pre-load current_user:
<% if current_user.present? %> <script type="text/javascript"> App.current_user = new App.Models.User(<%= current_user.to_json.html_safe %>); </script> <% end %>
-
or if you use Rabl:
<% if current_user.present? %> <script type="text/javascript"> App.current_user = new App.Models.User(<%= render('api/v1/users/user.json.rabl', object: current_user).html_safe %>); </script> <% end %>
Thanks to github.com/elentok/backbone-marionette-example and rails-backbone gem for a starting point.
-
make generator
-
on backbone:install, fetch js libs from github master branches and copy them over