-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Domains unique constraint (closes #279)
- Loading branch information
1 parent
2011fa9
commit ac1bedb
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,6 @@ class SpamDomain < ApplicationRecord | |
|
||
has_and_belongs_to_many :posts | ||
has_and_belongs_to_many :domain_tags | ||
|
||
validates :domain, uniqueness: true | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ArtOfCode-
Author
Member
|
||
end |
Is this going to throw an exception and prevent a post from being created? Seems like it throws a ValidationError or something.