Sha256: 61e029356cc76e7cbbb5fffa84a7ff4ced0862da6e362bda99fae2eede3f53d6

Contents?: true

Size: 1.7 KB

Versions: 60

Compression:

Stored size: 1.7 KB

Contents

I"Â(function() {
  var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    hasProp = {}.hasOwnProperty;

  App.Controllers.Main.Pages = (function(superClass) {
    extend(Pages, superClass);

    function Pages() {
      return Pages.__super__.constructor.apply(this, arguments);
    }

    Pages.prototype.index = function() {
      this.view = new App.Views.Main.Pages.ArticleList;
      this.view.render();
      this.connectWith([App.Models.Article, App.Models.Article.Comment]);
      return App.Models.Article.get('all', {
        page: 1
      }).then((function(_this) {
        return function(resp) {
          return _this.view.renderArticles(resp.resources);
        };
      })(this));
    };

    Pages.prototype.receivedSignal = function(signal, data) {
      switch (signal) {
        case 'Article published':
          return App.Models.Article.find({
            id: data.id,
            abbr: true
          }).then((function(_this) {
            return function(article) {
              return _this.view.renderNewArticle(article);
            };
          })(this));
        case 'Article updated':
          return this.view.updateArticle(data.id);
        case 'Article.Comment created':
          return this.view.commentsQuantityChangedForArticle(data.article_id, 1);
        case 'Article.Comment destroyed':
          return this.view.commentsQuantityChangedForArticle(data.article_id, -1);
      }
    };

    return Pages;

  })(App.Controllers.Base);

}).call(this);
:ET

Version data entries

60 entries across 27 versions & 1 rubygems

Version Path
loco-rails-3.0.3 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.5.3 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.5.2 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-3.0.2 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-3.0.1 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.5.1 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.5.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.4.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.4.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ia/iaAj0LFojQ5E9s6nq4Rj0PeYiEdT-K5i6bJlb59PbNg.cache
loco-rails-2.3.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ia/iaAj0LFojQ5E9s6nq4Rj0PeYiEdT-K5i6bJlb59PbNg.cache
loco-rails-2.3.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-3.0.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-3.0.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ia/iaAj0LFojQ5E9s6nq4Rj0PeYiEdT-K5i6bJlb59PbNg.cache
loco-rails-2.2.2 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.2.2 test/dummy/tmp/cache/assets/sprockets/v3.0/ia/iaAj0LFojQ5E9s6nq4Rj0PeYiEdT-K5i6bJlb59PbNg.cache
loco-rails-2.2.1 test/dummy/tmp/cache/assets/sprockets/v3.0/ia/iaAj0LFojQ5E9s6nq4Rj0PeYiEdT-K5i6bJlb59PbNg.cache
loco-rails-2.2.1 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.2.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ia/iaAj0LFojQ5E9s6nq4Rj0PeYiEdT-K5i6bJlb59PbNg.cache
loco-rails-2.2.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ga/GA9H1cys93EpS3OcyV3WLDWpGdb8bKdZTuoPFU2w7S0.cache
loco-rails-2.1.0 test/dummy/tmp/cache/assets/sprockets/v3.0/ia/iaAj0LFojQ5E9s6nq4Rj0PeYiEdT-K5i6bJlb59PbNg.cache