Class: UserAccount

Inherits:
ApplicationRecord show all
Defined in:
app/models/user_account.rb

Instance Method Summary collapse

Methods inherited from ApplicationRecord

descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?

Instance Method Details

#accepted_current_terms_of_use?Boolean (private)

Returns:

  • (Boolean)


23
24
25
# File 'app/models/user_account.rb', line 23

def accepted_current_terms_of_use?
  terms_of_use_agreements.current.last&.accepted?
end

#needs_accepted_terms_of_use?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/models/user_account.rb', line 17

def needs_accepted_terms_of_use?
  verified? && !accepted_current_terms_of_use?
end

#verified?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/models/user_account.rb', line 13

def verified?
  icn.present?
end