Class: NotifyUser::UserHash

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/notify_user/user_hash.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.confirm_hash(token, type) ⇒ Object



18
19
20
# File 'app/models/notify_user/user_hash.rb', line 18

def self.confirm_hash(token, type)
  return NotifyUser::UserHash.exists?(token: token, type: type, active: true)
end

Instance Method Details

#deactivateObject



22
23
24
25
# File 'app/models/notify_user/user_hash.rb', line 22

def deactivate
  self.active = false
  save
end