-
-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Polymorphic + STI uniqueness check
Instead of just initializing a new class that inherits from the parent class, we are initializing a new class but also overriding some method definitions. That is necessary because the Rails guides recommend that whenever you have a polymorphic association and STI you should override the `..._type` column to use the type name of the base STI class.
- Loading branch information
1 parent
33bec1c
commit a527d32
Showing
2 changed files
with
43 additions
and
1 deletion.
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
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