Skip to content

Commit

Permalink
adding default value to all players to be always false when added
Browse files Browse the repository at this point in the history
  • Loading branch information
ger619 committed Apr 24, 2024
1 parent d512a2d commit fe9fe7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Team < ApplicationRecord
has_one_attached :image

validates :jersey_number, presence: true, uniqueness: true
validates :active, inclusion: { in: [true, false], default: false }

def name
"#{first_name} #{last_name}"
Expand Down

0 comments on commit fe9fe7f

Please sign in to comment.