Sha256: 67c281ab9fa71a067f22b5e41127e0345ba8d91987f4722891f611f348f0d426

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

module RestPack::User::Service::Serializers
  class User
    include RestPack::Serializer

    self.model_class = Models::User
    self.key = :users

    attributes :id, :application_id, :description, :email,
               :image, :avatar, :location, :name, :nickname, :href

    def avatar
      image || "http://robohash.org/#{id}.png?size=200x200"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
restpack_user_service-0.0.4 lib/restpack_user_service/serializers/user.rb