Sha256: 42964cb8b411bbdb06da7430ba0e577edb13f300d13eeead6491384047357e1c

Contents?: true

Size: 851 Bytes

Versions: 1

Compression:

Stored size: 851 Bytes

Contents

// __NOTE:__ only overriding Backbone when `railsy_backbone (start) ... (end)` 
// is explicitly called out.
// 
// Before addign this to the repo, I'd like to enable a configuration value to 
// turn this feature on and off
// 
// 
// (function($) {
//   return $.extend($.fn, {
//     backboneLink: function(model) {
//       return $(this).find(":input").each(function() {
//         var el, name;
//         el = $(this);
//         name = el.attr("name");
//         model.bind("change:" + name, function() {
//           return el.val(model.get(name));
//         });
//         return $(this).bind("change", function() {
//           var attrs;
//           el = $(this);
//           attrs = {};
//           attrs[el.attr("name")] = el.val();
//           return model.set(attrs);
//         });
//       });
//     }
//   });
// })(jQuery);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
railsy_backbone-0.0.2 vendor/assets/javascripts/railsy_backbone.datalink.js