diaspora/app/presenters/comment_presenter.rb
Dennis Collinson efa79a4ad7 Refactor Post Presenter
and comment presenter
2012-05-10 12:24:21 -07:00

15 lines
No EOL
328 B
Ruby

class CommentPresenter < BasePresenter
def initialize(comment)
@comment = comment
end
def as_json(opts={})
{
:id => @comment.id,
:guid => @comment.guid,
:text => @comment.text,
:author => @comment.author.as_api_response(:backbone),
:created_at => @comment.created_at
}
end
end