mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-09 14:46:47 +08:00
Add dependant: :destroy to comments
This commit is contained in:
parent
8a73a3ab5c
commit
9e3bb8edb7
1 changed files with 5 additions and 5 deletions
|
@ -11,11 +11,11 @@ class Comment < ActiveRecord::Base
|
||||||
belongs_to :user, inverse_of: :comments
|
belongs_to :user, inverse_of: :comments
|
||||||
belongs_to :last_modified_by, foreign_key: 'last_modified_by_id', class_name: 'User'
|
belongs_to :last_modified_by, foreign_key: 'last_modified_by_id', class_name: 'User'
|
||||||
|
|
||||||
has_one :step_comment, inverse_of: :comment
|
has_one :step_comment, inverse_of: :comment, dependent: :destroy
|
||||||
has_one :my_module_comment, inverse_of: :comment
|
has_one :my_module_comment, inverse_of: :comment, dependent: :destroy
|
||||||
has_one :result_comment, inverse_of: :comment
|
has_one :result_comment, inverse_of: :comment, dependent: :destroy
|
||||||
has_one :sample_comment, inverse_of: :comment
|
has_one :sample_comment, inverse_of: :comment, dependent: :destroy
|
||||||
has_one :project_comment, inverse_of: :comment
|
has_one :project_comment, inverse_of: :comment, dependent: :destroy
|
||||||
|
|
||||||
def self.search(
|
def self.search(
|
||||||
user,
|
user,
|
||||||
|
|
Loading…
Add table
Reference in a new issue