Class: Stream::Public

Inherits:
Base
  • Object
show all
Defined in:
lib/stream/public.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, #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

#can_comment?(post) ⇒ Boolean


23
24
25
# File 'lib/stream/public.rb', line 23

def can_comment?(post)
  post.author.local?
end

#contacts_titleObject


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

def contacts_title
  I18n.translate("streams.public.contacts_title")
end

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

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

#postsActiveRecord::Association<Post>


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

def posts
  @posts ||= Post.all_public
end

#titleObject


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

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