Add explicit dependent: nil
to associations (#28169)
This commit is contained in:
parent
1564799952
commit
f70f39dd04
10 changed files with 20 additions and 30 deletions
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
|
||||
class CustomEmojiCategory < ApplicationRecord
|
||||
has_many :emojis, class_name: 'CustomEmoji', foreign_key: 'category_id', inverse_of: :category
|
||||
has_many :emojis, class_name: 'CustomEmoji', foreign_key: 'category_id', inverse_of: :category, dependent: nil
|
||||
|
||||
validates :name, presence: true, uniqueness: true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue