metamaps--metamaps/app/serializers/api/v2/user_serializer.rb

21 lines
365 B
Ruby
Raw Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
module Api
module V2
class UserSerializer < ApplicationSerializer
attributes :id,
2016-09-24 03:00:46 +00:00
:name,
:avatar,
:is_admin,
:generation
def avatar
object.image.url(:sixtyfour)
end
def is_admin
object.admin
end
end
end
end