marionette-rails
marionette-rails copied to clipboard
Rails + Backbone + Marionette + Coffeescript Boilerplate Example
= Rails + Backbone + Marionette + Coffeescript Boilerplate Example
== Used gems
- marionette-rails
- haml_coffee_assets, execjs
== Used libs
- 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)
== Advice
-
move javascript_include_tag to be just before
to pre-load data, put a script tag at end of body. Example to pre-load current_user:
<% if current_user.present? %> <% end %>
or if you use Rabl:
<% if current_user.present? %> <% end %>
== Credit
Thanks to https://github.com/elentok/backbone-marionette-example and rails-backbone gem for a starting point.
== Todo
- make generator
- on backbone:install, fetch js libs from github master branches and copy them over