{:uriI"©file://app/assets/javascripts/controllers/main/pages.coffee?type=application/javascript&pipeline=self&id=2eb024082db0701ca08952588a57deb6d4a13fb1628151c5aeb44450dcf704a5:ET:load_pathI"app/assets/javascripts;T: filenameI"9app/assets/javascripts/controllers/main/pages.coffee;T: nameI"controllers/main/pages;T:logical_pathI"#controllers/main/pages.self.js;T:content_typeI"application/javascript;T: sourceI"Â(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); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"Gfile-digest://app/assets/javascripts/controllers/main/pages.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%Ü<ã2ifk%{4NL u=ô«¡Lr5€Éáùïc/Kþ: lengthiÂ:dependencies_digest"%”àÎ*úòMÏÇô»Õñ6Ó+i2ŒhãÚfàÐ Èóù:idI"E2eb024082db0701ca08952588a57deb6d4a13fb1628151c5aeb44450dcf704a5;F: mtimel+ãL'W