module TokenAuthenticateMe::Concerns::Models::Authenticatable
Public Instance Methods
as_json(options = nil)
click to toggle source
Calls superclass method
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 62 def as_json(options = nil) { user: super(options) } end
attempting_to_change_email?()
click to toggle source
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 84 def attempting_to_change_email? email_changed? && persisted? end
attributes()
click to toggle source
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 52 def attributes { 'id' => id, 'username' => username, 'email' => email, 'created_at' => created_at, 'updated_at' => updated_at } end
downcase_email_and_username()
click to toggle source
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 88 def downcase_email_and_username self.email = email.downcase self.username = username.downcase end
email_confirmation_required?()
click to toggle source
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 80 def email_confirmation_required? !ignore_email_confirmation_on_change? && attempting_to_change_email? end
ignore_email_confirmation_on_change?()
click to toggle source
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 74 def ignore_email_confirmation_on_change? true end
ignore_email_format_validation?()
click to toggle source
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 70 def ignore_email_format_validation? false end
ignore_username_format_validation?()
click to toggle source
# File lib/token_authenticate_me/concerns/models/authenticatable.rb, line 66 def ignore_username_format_validation? false end