Sha256: f50d57713a3f1d41d2e608f610d67089be70e9f8c8a443a5e7e79fb04ab9177c
Contents?: true
Size: 773 Bytes
Versions: 31
Compression:
Stored size: 773 Bytes
Contents
class App.Controllers.Main.Pages extends App.Controllers.Base index: -> @view = new App.Views.Main.Pages.ArticleList @view.render() this.connectWith [App.Models.Article, App.Models.Article.Comment] App.Models.Article.get('all', page: 1).then (resp) => @view.renderArticles resp.resources receivedSignal: (signal, data) -> switch signal when 'Article published' App.Models.Article.find(id: data.id, abbr: true).then (article) => @view.renderNewArticle article when 'Article updated' @view.updateArticle data.id when 'Article.Comment created' @view.commentsQuantityChangedForArticle data.article_id, 1 when 'Article.Comment destroyed' @view.commentsQuantityChangedForArticle data.article_id, -1
Version data entries
31 entries across 27 versions & 1 rubygems