Class: Stream::Mention
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
Instance Attribute Summary
Attributes inherited from Base
#max_time, #order, #publisher, #user
Instance Method Summary collapse
- #link(opts = {}) ⇒ Object
-
#posts ⇒ ActiveRecord::Association<Post>
AR association of posts.
- #title ⇒ Object
Methods inherited from Base
#aspect, #aspects, #for_all_aspects?, #initialize, #people, #post_from_group, #stream_posts
Constructor Details
This class inherits a constructor from Stream::Base
Instance Method Details
#link(opts = {}) ⇒ Object
8 9 10 |
# File 'lib/stream/mention.rb', line 8 def link(opts={}) Rails.application.routes.url_helpers.mentions_path(opts) end |
#posts ⇒ ActiveRecord::Association<Post>
Returns AR association of posts.
17 18 19 |
# File 'lib/stream/mention.rb', line 17 def posts @posts ||= StatusMessage.where_person_is_mentioned(self.user.person) end |
#title ⇒ Object
12 13 14 |
# File 'lib/stream/mention.rb', line 12 def title I18n.translate("streams.mentions.title") end |