{:uriI"file://app/assets/javascripts/controllers/admin/articles.coffee?type=application/javascript&pipeline=self&id=8b394f839ceae2036bbe76c2e9afe3b1e71f96198063560410a4d49d0670bc1b: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"%0M+s3$,H|'01#/":idI"E8b394f839ceae2036bbe76c2e9afe3b1e71f96198063560410a4d49d0670bc1b;F: mtimel+n+