Files
bit/app/models/user.rb
T
Juan Rodriguez 73b674b613 refactor: Username and slug unique indexes, before actions for set link and user
confirm_password_validation around action, unnecessary helpers removed, rubocop-rails suggestions applied

Add username index and unique slug index migrations
2021-06-15 15:24:34 -05:00

9 lines
168 B
Ruby

# frozen_string_literal: true
class User < ApplicationRecord
validates :username, uniqueness: true
has_secure_password
has_many :links, dependent: :nullify
end