{:uriI"file://app/assets/javascripts/controllers/admin/articles.coffee?type=application/javascript&pipeline=self&id=912c35a3543d1ce6b9cedd9bd1a278061a61af607aa41227baaffd1d8946f20c:ET:load_pathI"app/assets/javascripts;T: filenameI"=app/assets/javascripts/controllers/admin/articles.coffee;T: nameI"controllers/admin/articles;T:logical_pathI"'controllers/admin/articles.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.Admin.Articles = (function(superClass) { extend(Articles, superClass); function Articles() { return Articles.__super__.constructor.apply(this, arguments); } Articles.prototype.published = function() { this.view = new App.Views.Admin.Articles.List; this.connectWith([App.Models.Article, App.Models.Article.Comment]); return App.Models.Article.get('published').then((function(_this) { return function(resp) { return _this.view.render({ articles: resp.resources }); }; })(this)); }; Articles.prototype.edit = function() { var editView; editView = new App.Views.Admin.Articles.Edit; App.Models.Article.find(this.params.id).then(function(article) { var formView; editView.render(article); formView = new App.Views.Admin.Articles.Form; return formView.render(article); }); return App.Models.Article.Comment.all({ articleId: this.params.id }).then(function(resp) { return editView.renderComments(resp.resources); }); }; Articles.prototype.receivedSignal = function(signal, data) { switch (signal) { case 'Article published': return App.Models.Article.find({ id: data.id }).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 Articles; })(App.Controllers.Base); }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"Kfile-digest://app/assets/javascripts/controllers/admin/articles.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%ø ae0y`oǴ~S: lengthi:dependencies_digest"%#JApGd ro5|\(:idI"E912c35a3543d1ce6b9cedd9bd1a278061a61af607aa41227baaffd1d8946f20c;F: mtimel+n+