user.rb 387 B

123456789101112
  1. class User < ApplicationRecord
  2. # Include default devise modules. Others available are:
  3. # :confirmable, :lockable, :timeoutable and :omniauthable
  4. devise :masqueradable, :database_authenticatable, :registerable,
  5. :recoverable, :rememberable, :trackable, :validatable
  6. validates :first_name, :last_name, presence: true
  7. def name
  8. "#{first_name} #{last_name}"
  9. end
  10. end