Sha256: 023e3ab43bb5804643c36db0018a43a1bf4905a0682410fdf7f1881b5ca8f211

Contents?: true

Size: 376 Bytes

Versions: 2

Compression:

Stored size: 376 Bytes

Contents

# frozen_string_literal :true

module ActionTracker
  module Models
    class User < ActionTracker::Models::ApplicationRecord
      attribute :id, String
      attribute :name, String
      attribute :type, String

      validates :id, :name, :type, presence: true

      def self.default_user
        new(id: 0, name: 'Anonymous', type: 'System')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
action_tracker_client-0.1.8 lib/action_tracker/models/user.rb
action_tracker_client-0.1.7 lib/action_tracker/models/user.rb