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, #for_all_aspects?, #initialize, #people, #post_from_group, #stream_posts

Constructor Details

This class inherits a constructor from Stream::Base

Instance Method Details

#aspectsObject

Override base class method



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

def aspects
  ["public"]
end


8
9
10
# File 'lib/stream/public.rb', line 8

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

#postsActiveRecord::Association<Post>

Returns AR association of posts.

Returns:

  • (ActiveRecord::Association<Post>)

    AR association of posts



17
18
19
# File 'lib/stream/public.rb', line 17

def posts
  @posts ||= Post.all_public
end

#titleObject



12
13
14
# File 'lib/stream/public.rb', line 12

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