Sha256: eb3b6336ba1243767fe328b260aaa004d34bd052251b8ff1f06a2d2ad6844c3f

Contents?: true

Size: 412 Bytes

Versions: 15

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true

module V1
  module Resources
    class User < Base
      model ::User

      # To compute the full_name (method below) we need to load first and last names from the DB
      property :full_name, dependencies: %i[first_name last_name]

      # Computed attribute that combines first and last
      def full_name
        [first_name, last_name].join(' ')
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
praxis-2.0.pre.33 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.32 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.31 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.30 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.29 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.28 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.27 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.26 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.25 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.24 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.23 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.22 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.21 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.20 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb
praxis-2.0.pre.19 tasks/thor/templates/generator/example_app/app/v1/resources/user.rb