Skip to content

Instantly share code, notes, and snippets.

View jeffmess's full-sized avatar
🧑‍🍳
Paying for my sins as a Ruby dev 1 runtime error at a time

jeffmess

🧑‍🍳
Paying for my sins as a Ruby dev 1 runtime error at a time
  • Cloud Assess
  • Sunshine Coast, Australia
View GitHub Profile
@jeffmess
jeffmess / backbone-rails.js
Created July 26, 2011 13:16
Alias Backbone.sync method to inject Rails specific parameters
_.extend(Backbone.Model.prototype, {
// By default, rails expects model params to be wrapped in a nested params hash
// https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/params_wrapper.rb
_paramsWrapper : function() {
return this.paramsWrapper;
}
});
// Alias Backbone.sync method to inject Rails specific