Class: StreamsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- StreamsController
- Defined in:
- app/controllers/streams_controller.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.
Instance Method Summary collapse
- #activity ⇒ Object
- #aspects ⇒ Object
- #commented ⇒ Object
- #followed_tags ⇒ Object
- #liked ⇒ Object
- #local_public ⇒ Object
- #mentioned ⇒ Object
- #multi ⇒ Object
- #public ⇒ Object
Instance Method Details
#activity ⇒ Object
36 37 38 |
# File 'app/controllers/streams_controller.rb', line 36 def activity stream_responder(Stream::Activity) end |
#aspects ⇒ Object
17 18 19 20 21 22 |
# File 'app/controllers/streams_controller.rb', line 17 def aspects aspect_ids = (session[:a_ids] || []) @stream = Stream::Aspect.new(current_user, aspect_ids, :max_time => max_time) stream_responder end |
#commented ⇒ Object
50 51 52 |
# File 'app/controllers/streams_controller.rb', line 50 def commented stream_responder(Stream::Comments) end |
#followed_tags ⇒ Object
62 63 64 65 |
# File 'app/controllers/streams_controller.rb', line 62 def gon.preloads[:tagFollowings] = stream_responder(Stream::FollowedTag) end |
#liked ⇒ Object
54 55 56 |
# File 'app/controllers/streams_controller.rb', line 54 def liked stream_responder(Stream::Likes) end |
#local_public ⇒ Object
28 29 30 31 32 33 34 |
# File 'app/controllers/streams_controller.rb', line 28 def local_public if AppConfig.local_posts_stream?(current_user) stream_responder(Stream::LocalPublic) else head :not_found end end |
#mentioned ⇒ Object
58 59 60 |
# File 'app/controllers/streams_controller.rb', line 58 def mentioned stream_responder(Stream::Mention) end |
#multi ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'app/controllers/streams_controller.rb', line 40 def multi if current_user.getting_started gon.preloads[:getting_started] = true inviter = current_user.invited_by.try(:person) gon.preloads[:mentioned_person] = {name: inviter.name, handle: inviter.diaspora_handle} if inviter end stream_responder(Stream::Multi) end |