Skip to content

Commit

Permalink
Remove reviews with posts
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Feb 26, 2018
1 parent 5ae8828 commit 76f18a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/post.rb
Expand Up @@ -17,7 +17,7 @@ class Post < ApplicationRecord
has_many :flag_logs, dependent: :destroy
has_many :flags, dependent: :destroy
has_and_belongs_to_many :spam_domains
has_many :reviews, class_name: 'ReviewResult'
has_many :reviews, class_name: 'ReviewResult', dependent: :destroy

scope(:includes_for_post_row, -> { includes(:stack_exchange_user).includes(:reasons).includes(feedbacks: [:user, :api_key]) })
scope(:without_feedback, -> { left_joins(:feedbacks).where(feedbacks: { post_id: nil }) })
Expand Down

0 comments on commit 76f18a5

Please sign in to comment.