Skip to content

Instantly share code, notes, and snippets.

@cpjobling
Last active December 16, 2015 06:58
Show Gist options
  • Select an option

  • Save cpjobling/5394923 to your computer and use it in GitHub Desktop.

Select an option

Save cpjobling/5394923 to your computer and use it in GitHub Desktop.
Backbone on rails initializer. Extracted from the JavaScript generated from app_name.js.coffee thatw as generated by running the `backbone-on-rails` command bundle exec rails g backbone:install
(function() {
window.Pselectr = {
Models: {},
Collections: {},
Views: {},
Routers: {},
init: function() {
alert('Hello from Backbone')
}
};
$(document).ready(function() {
return Pselectr.init();
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment