Sha256: 73e072039a796b9e0c98635e0240289d8ecadf39fa5a2a154a7f356f0db9baf6

Contents?: true

Size: 255 Bytes

Versions: 7

Compression:

Stored size: 255 Bytes

Contents

module DiscoApp
  class UserSerializer

    include FastJsonapi::ObjectSerializer

    attributes :email, :first_name, :id, :last_name

    attribute :initials do |user|
      [user.first_name, user.last_name].compact.map(&:first).join
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
disco_app-0.17.0 lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb
disco_app-0.18.0 lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb
disco_app-0.18.2 lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb
disco_app-0.18.3 lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb
disco_app-0.18.6 lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb
disco_app-0.18.4 lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb
disco_app-0.18.1 lib/generators/disco_app/react/templates/app/serializers/disco_app/user_serializer.rb