Class: StreamsController

Inherits:
ApplicationController show all
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

Instance Method Details

#activityObject


28
29
30
# File 'app/controllers/streams_controller.rb', line 28

def activity
  stream_responder(Stream::Activity)
end

#aspectsObject


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

#commentedObject


42
43
44
# File 'app/controllers/streams_controller.rb', line 42

def commented
  stream_responder(Stream::Comments)
end

#followed_tagsObject


54
55
56
57
# File 'app/controllers/streams_controller.rb', line 54

def followed_tags
  gon.preloads[:tagFollowings] = tags
  stream_responder(Stream::FollowedTag)
end

#likedObject


46
47
48
# File 'app/controllers/streams_controller.rb', line 46

def liked
  stream_responder(Stream::Likes)
end

#mentionedObject


50
51
52
# File 'app/controllers/streams_controller.rb', line 50

def mentioned
  stream_responder(Stream::Mention)
end

#multiObject


32
33
34
35
36
37
38
39
40
# File 'app/controllers/streams_controller.rb', line 32

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

#publicObject


24
25
26
# File 'app/controllers/streams_controller.rb', line 24

def public
  stream_responder(Stream::Public)
end