Skip to content
Snippets Groups Projects
Commit 0edca457 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

Merge branch 'master' of gitlab.c3sl.ufpr.br:portalmec/portalmec

parents 9c1c673f 992e2ea9
No related branches found
No related tags found
No related merge requests found
......@@ -4,10 +4,14 @@ class LearningObjectSerializer < ActiveModel::Serializer
end
def default_mime_type
object.default_attachment.try(:retrieve_url)
object.default_attachment.try(:mime_type)
end
def default_attachment_id
object.default_attachment.try(:id)
end
attributes :id, :name, :description, :author, :thumbnail, :publisher, :language, :default_location, :default_mime_type, :score, :license, :likes_count, :shares_count, :created_at, :updated_at
attributes :id, :name, :description, :author, :thumbnail, :publisher, :language, :default_attachment_id, :default_location, :default_mime_type, :score, :license, :likes_count, :shares_count, :created_at, :updated_at
has_many :tags
has_many :attachments
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment