Sha256: 7b339e614bdee7344694368508f2a38c899bec9cb5095af4e39a97aa0a16a5d9
Contents?: true
Size: 733 Bytes
Versions: 28
Compression:
Stored size: 733 Bytes
Contents
class App.Controllers.Main.Articles extends App.Controllers.Base show: -> @view = new App.Views.Main.Articles.Show comment: new App.Models.Article.Comment articleId: @params.id @view.render() this.connectWith [App.Models.Article.Comment] App.Models.Article.find(@params.id).then (article) => @view.renderArticle article App.Models.Article.Comment.all(articleId: @params.id).then (resp) => @view.renderComments resp.resources receivedSignal: (signal, data) -> switch signal when 'Article.Comment created' return if data.article_id isnt @params.id App.Models.Article.Comment.find(id: data.id, articleId: data.article_id) .then (comment) => @view.renderComments [comment]
Version data entries
28 entries across 27 versions & 1 rubygems