Class: Stream::Mention

Inherits:
Base
  • Object
show all
Defined in:
lib/stream/mention.rb

Overview

Copyright © 2010-2011, Diaspora Inc. This file is

licensed under the Affero General Public License version 3 or later.  See
the COPYRIGHT file.

Constant Summary

Constants inherited from Base

Base::TYPES_OF_POST_IN_STREAM

Instance Attribute Summary

Attributes inherited from Base

#max_time, #order, #publisher, #user

Instance Method Summary collapse

Methods inherited from Base

#aspect, #aspect_ids, #aspects, #can_comment?, #contacts_link, #for_all_aspects?, #initialize, #people, #post_from_group, #stream_posts

Constructor Details

This class inherits a constructor from Stream::Base

Instance Method Details

#contacts_titleObject


19
20
21
# File 'lib/stream/mention.rb', line 19

def contacts_title
  I18n.translate('streams.mentions.contacts_title')
end

6
7
8
# File 'lib/stream/mention.rb', line 6

def link(opts={})
  Rails.application.routes.url_helpers.mentions_path(opts)
end

#postsActiveRecord::Association<Post>


15
16
17
# File 'lib/stream/mention.rb', line 15

def posts
  @posts ||= StatusMessage.where_person_is_mentioned(self.user.person)
end

#titleObject


10
11
12
# File 'lib/stream/mention.rb', line 10

def title
  I18n.translate("streams.mentions.title")
end