Skip to content
Snippets Groups Projects
Commit 6cd2205a authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'feat-hasliked'

parents abe43ce7 3f6c9989
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,30 @@ class LearningObjectSerializer < ActiveModel::Serializer
object.object_type.try(:name)
end
attributes :id, :name, :description, :author, :thumbnail, :publisher, :object_type, :language, :default_attachment_id, :default_location, :default_mime_type, :score, :state, :review_ratings_average, :license, :likes_count, :shares_count, :created_at, :updated_at
def liked?
object.liked? current_user
end
attributes :id,
:name,
:description,
:author,
:thumbnail,
:publisher,
:object_type,
:language,
:default_attachment_id,
:default_location,
:default_mime_type,
:score,
:state,
:review_ratings_average,
:license,
:liked?,
:likes_count,
:shares_count,
:created_at,
:updated_at
has_many :tags
has_many :subjects
......
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