Skip to content
Snippets Groups Projects
Commit 5ecf2751 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

add relations

parent 173ba855
No related branches found
No related tags found
No related merge requests found
class FollowSerializer < ActiveModel::Serializer
cache key: 'follow', expires_in: 24.hours
def follower
object.user
end
attributes :id
attributes :id, :follower, :followable
belongs_to :followable
has_many :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