mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-07 13:44:23 +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 :last_modified_by, foreign_key: 'last_modified_by_id', class_name: 'User'
|
||||
|
||||
has_one :step_comment, inverse_of: :comment
|
||||
has_one :my_module_comment, inverse_of: :comment
|
||||
has_one :result_comment, inverse_of: :comment
|
||||
has_one :sample_comment, inverse_of: :comment
|
||||
has_one :project_comment, inverse_of: :comment
|
||||
has_one :step_comment, inverse_of: :comment, dependent: :destroy
|
||||
has_one :my_module_comment, inverse_of: :comment, dependent: :destroy
|
||||
has_one :result_comment, inverse_of: :comment, dependent: :destroy
|
||||
has_one :sample_comment, inverse_of: :comment, dependent: :destroy
|
||||
has_one :project_comment, inverse_of: :comment, dependent: :destroy
|
||||
|
||||
def self.search(
|
||||
user,
|
||||
|
|
Loading…
Add table
Reference in a new issue