Class: Relation::Follow

Inherits:
Single show all
Defined in:
app/models/relation/follow.rb

Overview

This relation model implements Twitter-like relations: Users just have followers and followings.

You can achieve a Twitter-like model for users setting custom relations to empty and system relations to [ :follow ] in config/initializers/social_stream.rb

config.custom_relations[:user] = {}

config.system_relations[:user] = [ :follow ]

Constant Summary collapse

PERMISSIONS =
[
  [ 'create', 'activity' ],
  [ 'read',   'activity' ],
  [ 'follow', nil ]
]

Constants inherited from Relation

Negative, Positive

Method Summary

Methods inherited from Single

#available_permissions, instance, #name, permissions

Methods inherited from Relation

#<=>, allow, allow?, #available_permissions, create_activity?, #follow?, ids_shared_with, #mode, negative_names, normalize, normalize_id, #positive?, positive_names, system_list