Browse Source

#84

feature/084
みてるぞ 1 day ago
parent
commit
851eb04e14
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      backend/app/models/post.rb

+ 1
- 1
backend/app/models/post.rb View File

@@ -4,7 +4,7 @@ class Post < ApplicationRecord
belongs_to :parent, class_name: 'Post', optional: true, foreign_key: 'parent_id'
belongs_to :uploaded_user, class_name: 'User', optional: true

has_many :post_tags, dependent: :delete_all, inverse_of: :post
has_many :post_tags, dependent: :destroy, inverse_of: :post
has_many :active_post_tags, -> { kept }, class_name: 'PostTag', inverse_of: :post
has_many :post_tags_with_discarded, -> { with_discarded }, class_name: 'PostTag'
has_many :tags, through: :active_post_tags


Loading…
Cancel
Save