/**
 * Used to affix a set of views together
 *
 * Copyright 2015 Ethan Smith
 */

 var Marionette = require('backbone.marionette');

var AffixedView = Marionette.ItemView.extend({
   el: '<div></div>',
   template: false,

   /**
    * @param view Marionette.View
    */
   affix: function(view, options) {
      this.triggerMethod('before:show', view, this, options);
      Marionette.triggerMethodOn(view, 'before:show', view, this, options);

      this._renderView(view);
      this.$el.append(view.$el);

      this.triggerMethod('show', view, this, options);
      Marionette.triggerMethodOn(view, 'show', view, this, options);
   },

   empty: function() {
      this.$el.empty();
   },

   _renderView: function(view) {
      Marionette.triggerMethodOn(view, 'before:render', view);
      view.render();
      Marionette.triggerMethodOn(view, 'render', view);
   }
});

module.exports = AffixedView;

@@ -354,32 +354,225 @@
  this, options);
+%0A%0A      this.affixOnShow(view, options);%0A%0A      this.triggerMethod('show', view, this, options);%0A   %7D,%0A%0A   /**%0A    * @param view Marionette.View%0A    */%0A   affixOnShow: function(view, options) %7B
 %0A      Marionett
@@ -701,63 +701,8 @@
 );%0A%0A
-      this.triggerMethod('show', view, this, options);%0A
     

Add affixOnShow to AffixedView