diaspora/lib/stream/comments.rb
Johannes Hackel 4b25545e82 fix sql error
2011-12-02 15:03:15 +01:00

22 lines
602 B
Ruby

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Stream::Comments < Stream::Base
def link(opts={})
Rails.application.routes.url_helpers.comment_stream_path(opts)
end
def title
I18n.translate("streams.comment_stream.title")
end
# @return [ActiveRecord::Association<Post>] AR association of posts
def posts
@posts ||= StatusMessage.commented_by(self.user.person)
end
def contacts_title
I18n.translate('streams.comment_stream.contacts_title')
end
end