Module: Api::Follow

Extended by:
ActiveSupport::Concern
Included in:
ChallengesController, DatasetsController, NeedsController, ProgramsController, ProjectsController, SpacesController, UsersController, WorkgroupsController
Defined in:
app/controllers/concerns/api/follow.rb

Instance Method Summary collapse

Instance Method Details

#followersObject

Those helpers are user for finding followers and following of any given object the serializer return a list of users.



9
10
11
# File 'app/controllers/concerns/api/follow.rb', line 9

def followers
  render json: @obj, serializer: Api::FollowersSerializer
end

#followingObject



13
14
15
# File 'app/controllers/concerns/api/follow.rb', line 13

def following
  render json: @obj, serializer: Api::FollowingSerializer
end