metamaps--metamaps/app/serializers/new_user_serializer.rb

16 lines
256 B
Ruby
Raw Permalink Normal View History

2016-03-11 22:48:07 +00:00
class NewUserSerializer < ActiveModel::Serializer
attributes :id,
:name,
:avatar,
:is_admin,
:generation
def avatar
object.image.url(:sixtyfour)
end
def is_admin
object.admin
end
end