Codeminer42/cm42-central

View on GitHub
app/assets/javascripts/libs/backbone_plugins.js

Summary

Maintainability
A
0 mins
Test Coverage
import 'vendor/backbone.rails';

Backbone.View = (function (View) {
  return View.extend({
    constructor: function (options) {
      this.options = options || {};
      View.apply(this, arguments);
    },
    make: function (tagName, attributes, content) {
      var el = document.createElement(tagName);
      if (attributes) $(el).attr(attributes);
      if (content) $(el).html(content);
      return el;
    },
  });
})(Backbone.View);