Sha256: b644ed83e0e2375dfc448c8f1b7dc00b8ba2cb32db5eb3d5140d6828e7aa1ac3

Contents?: true

Size: 538 Bytes

Versions: 10

Compression:

Stored size: 538 Bytes

Contents

require_relative "../../../../lib/isimud"

class User < ActiveRecord::Base
  include Isimud::EventObserver

  belongs_to :company

  attr_accessor :events

  serialize :keys, Array

  scope :active, -> {where('deactivated != ?', true)}

  def handle_event(event)
    self.events ||= Array.new
    self.events << event
  end

  def queue_prefix
    'test'
  end

  def routing_keys
    keys
  end

  def enable_listener?
    !deactivated
  end

  watch_attributes :key, :login_count

  def key
    Base64.encode64("user-#{id}")
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
isimud-1.4.7 spec/internal/app/models/user.rb
isimud-1.4.6 spec/internal/app/models/user.rb
isimud-1.4.5 spec/internal/app/models/user.rb
isimud-1.4.4 spec/internal/app/models/user.rb
isimud-1.4.3 spec/internal/app/models/user.rb
isimud-1.3.9 spec/internal/app/models/user.rb
isimud-1.4.2 spec/internal/app/models/user.rb
isimud-1.4.1 spec/internal/app/models/user.rb
isimud-1.3.8 spec/internal/app/models/user.rb
isimud-1.3.1 spec/internal/app/models/user.rb