Class: MeducationSDK::CollectionTopic
- Inherits:
-
Resource
- Object
- Loquor::Resource
- Resource
- MeducationSDK::CollectionTopic
show all
- Defined in:
- lib/meducation_sdk/resources/collection_topic.rb
Constant Summary
Constants included
from Helpers
Helpers::SDK_TO_SPI_MAPPINGS
Instance Method Summary
collapse
Methods inherited from Resource
#created_at, spi_type=, #updated_at
Methods included from Helpers
#sdk_class_for, #sdk_type_for, #spi_type_for
Instance Method Details
#authors ⇒ Object
11
12
13
|
# File 'lib/meducation_sdk/resources/collection_topic.rb', line 11
def authors
@authors ||= Author.where(id: author_ids)
end
|
#collection ⇒ Object
7
8
9
|
# File 'lib/meducation_sdk/resources/collection_topic.rb', line 7
def collection
@collection ||= Collection.find(collection_id)
end
|
19
20
21
|
# File 'lib/meducation_sdk/resources/collection_topic.rb', line 19
def
@comments ||= Comment.where(id: )
end
|
#users ⇒ Object
15
16
17
|
# File 'lib/meducation_sdk/resources/collection_topic.rb', line 15
def users
@users ||= User.where(id: authors.map(&:user_id))
end
|