Class: Stream::Activity

Inherits:
Base
  • Object
show all
Defined in:
lib/stream/activity.rb

Constant Summary

Constants inherited from Base

Base::TYPES_OF_POST_IN_STREAM

Instance Attribute Summary

Attributes inherited from Base

#max_time, #publisher, #user

Instance Method Summary collapse

Methods inherited from Base

#aspect, #aspects, #can_comment?, #for_all_aspects?, #initialize, #people, #post_from_group, #stream_posts

Constructor Details

This class inherits a constructor from Stream::Base

Instance Method Details


4
5
6
# File 'lib/stream/activity.rb', line 4

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

#orderObject


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

def order
  "interacted_at"
end

#postsActiveRecord::Association<Post>

Returns AR association of posts.

Returns:

  • (ActiveRecord::Association<Post>)

    AR association of posts


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

def posts
  @posts ||= EvilQuery::Participation.new(user).posts
end

#titleObject


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

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