Class: Guts::User

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
TrackableConcern
Defined in:
app/models/guts/user.rb

Overview

User model

Constant Summary collapse

VALID_EMAIL_REGEX =

Regex to test email against for validation

/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i

Instance Method Summary collapse

Instance Method Details

#email=(email) ⇒ Object

Setter override for email to downcase and strip email before database



30
31
32
# File 'app/models/guts/user.rb', line 30

def email=(email)
  self[:email] = email.downcase.strip
end