Module: Authorization::AasmRoles::StatefulRolesInstanceMethods

Defined in:
lib/authorization/aasm_roles.rb

Overview

class methods

Instance Method Summary collapse

Instance Method Details

#do_activateObject



57
58
59
60
61
# File 'lib/authorization/aasm_roles.rb', line 57

def do_activate
  @activated = true
  self.activated_at = Time.now.utc
  self.deleted_at = self.activation_code = nil
end

#do_deleteObject



53
54
55
# File 'lib/authorization/aasm_roles.rb', line 53

def do_delete
  self.deleted_at = Time.now.utc
end

#recently_activated?Boolean

Returns true if the user has just been activated.

Returns:

  • (Boolean)


50
51
52
# File 'lib/authorization/aasm_roles.rb', line 50

def recently_activated?
  @activated
end