Class: Relation::Single
- Defined in:
- app/models/relation/single.rb
Overview
Constant Summary collapse
- PERMISSIONS =
[]
Constants inherited from Relation
Class Method Summary collapse
Instance Method Summary collapse
-
#available_permissions ⇒ Object
The available permissions for Single match with the permissions described in the variable.
-
#name ⇒ Object
The name of public relation.
Methods inherited from Relation
#<=>, allow, allow?, create_activity?, #follow?, ids_shared_with, #mode, negative_names, normalize, normalize_id, #positive?, positive_names, system_list
Class Method Details
.instance ⇒ Object
10 11 12 13 14 |
# File 'app/models/relation/single.rb', line 10 def instance @instance ||= first || create!(:permissions => ) end |
.permissions ⇒ Object
16 17 18 |
# File 'app/models/relation/single.rb', line 16 def Permission.instances self::PERMISSIONS end |
Instance Method Details
#available_permissions ⇒ Object
The available permissions for Relation::Single match with the permissions described in the variable
28 29 30 |
# File 'app/models/relation/single.rb', line 28 def self.class. end |
#name ⇒ Object
The name of public relation
22 23 24 |
# File 'app/models/relation/single.rb', line 22 def name I18n.t("relation_#{ self.class.name.split("::").last.underscore }.name") end |