Skip to content

Commit

Permalink
added validations
Browse files Browse the repository at this point in the history
  • Loading branch information
rukshanuddin committed Apr 27, 2020
1 parent 61cc5a5 commit 8b0b597
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
class User < ApplicationRecord
validates :name, presence: true, uniqueness: { case_sensitive: false }
validates :user_handle, presence: true, uniqueness: { case_sensitive: false }

has_many :comments
has_many :handles
end

0 comments on commit 8b0b597

Please sign in to comment.