Skip to content
Snippets Groups Projects
Commit ac22772e authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Adapted serializers

parent d7be4768
No related branches found
No related tags found
1 merge request!305Feed
class FollowSerializer < ActiveModel::Serializer
has_one :followable
attributes :id, :user_id
attributes :id, :user_id, :followable
end
class PublicActivity::ActivitySerializer < ActiveModel::Serializer
attributes :id, :owner, :trackable, :trackable_type, :recipient, :parameters, :created_at
attributes :id, :trackable_type, :recipient, :parameters, :created_at
has_one :owner
has_one :trackable
end
......@@ -12,7 +12,7 @@ class ReviewSerializer < ActiveModel::Serializer
object.user_approves? current_user
end
attributes :id, :name, :description, :pros, :cons, :rating_average, :rates_count, :created_at, :updated_at, :reviewable, :rated, :approves
attributes :id, :name, :description, :pros, :cons, :rating_average, :rates_count, :created_at, :updated_at, :reviewable, :reviewable_type, :rated, :approves
has_many :review_ratings
belongs_to :user
end
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