diff options
Diffstat (limited to 'app/presenters/last_three_comments_decorator.rb')
-rw-r--r-- | app/presenters/last_three_comments_decorator.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/presenters/last_three_comments_decorator.rb b/app/presenters/last_three_comments_decorator.rb index 884d0dc49..04e1c91b3 100644 --- a/app/presenters/last_three_comments_decorator.rb +++ b/app/presenters/last_three_comments_decorator.rb @@ -4,6 +4,8 @@ class LastThreeCommentsDecorator end def as_json(options={}) - @presenter.as_json.merge({:last_three_comments => CommentPresenter.as_collection(@presenter.post.last_three_comments)}) + @presenter.as_json.tap do |post| + post[:interactions].merge!(:comments => CommentPresenter.as_collection(@presenter.post.last_three_comments)) + end end end
\ No newline at end of file |