mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Destroy rich text dependents
This commit is contained in:
parent
3a515bb308
commit
a79fa9d223
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ module ActionText
|
|||
end
|
||||
CODE
|
||||
|
||||
has_one :"rich_text_#{name}", -> { where(name: name) }, class_name: "ActionText::RichText", as: :record, inverse_of: :record, dependent: false
|
||||
has_one :"rich_text_#{name}", -> { where(name: name) }, class_name: "ActionText::RichText", as: :record, inverse_of: :record, dependent: :destroy
|
||||
|
||||
scope :"with_rich_text_#{name}", -> { includes("rich_text_#{name}") }
|
||||
|
||||
|
|
Loading…
Reference in a new issue