Class: MeducationSDK::MediaFile
- Defined in:
- lib/meducation_sdk/resources/media_file.rb
Direct Known Subclasses
Defined Under Namespace
Modules: State
Constant Summary
Constants included from Helpers
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
#comments ⇒ Object
9 10 11 |
# File 'lib/meducation_sdk/resources/media_file.rb', line 9 def comments @comments ||= Comment.where(item_id: id, item_type: "MediaFile") end |
#indexable_content ⇒ Object
13 14 15 16 17 18 |
# File 'lib/meducation_sdk/resources/media_file.rb', line 13 def indexable_content @indexable_content ||= begin object = IndexableContent.where(item_id: id, item_type: "MediaFile").first object ? object.content : '' end end |
#user ⇒ Object
5 6 7 |
# File 'lib/meducation_sdk/resources/media_file.rb', line 5 def user @user ||= User.find(user_id) end |