Class: User

Inherits:
Entity
  • Object
show all
Defined in:
lib/africompta/entities/users.rb

Instance Method Summary collapse

Instance Method Details

#reset_idObject



63
64
65
# File 'lib/africompta/entities/users.rb', line 63

def reset_id
  self.full = Digest::MD5.hexdigest((rand 2**128).to_s).to_s
end

#update_account_indexObject



54
55
56
# File 'lib/africompta/entities/users.rb', line 54

def 
  self. = Users.match_by_name('local'). - 1
end

#update_allObject



58
59
60
61
# File 'lib/africompta/entities/users.rb', line 58

def update_all
  update_movement_index
  
end

#update_movement_indexObject



50
51
52
# File 'lib/africompta/entities/users.rb', line 50

def update_movement_index
  self.movement_index = Users.match_by_name('local').movement_index - 1
end