# Name: Brendan Behrens
# Course: CSC 415
# Semester: Fall 2017
# Instructor: Dr. Pulimood 
# Project name: Bully Prevention App
# Description: An app to help bully victims find ways to escape their situation
# Filename: user.rb
# Description: this class checks the user data to makesure it is the correct information
# Last modified on: 12/1/2017
class User < ApplicationRecord

    # Set Email to Lowercase to Avoid Login Issues
    before_save { self.email = email.downcase }
    
    # Require Name, Email, and Major
    validates(:name, presence: true)
    validates(:email, presence: true)

    has_secure_password
end
