Skip to content

Commit

Permalink
might close #184 if I'm lucky
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed May 29, 2017
1 parent ce7680c commit f80a440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/post.rb
Expand Up @@ -16,7 +16,7 @@ class Post < ApplicationRecord
scope(:autoflagged, -> { includes(:flag_logs).where(flag_logs: { is_auto: true }).where.not(flag_logs: { id: nil }) })

scope(:not_autoflagged, lambda {
joins('LEFT OUTER JOIN flag_logs ON flag_logs.post_id = posts.id AND flag_logs.is_auto = 0').where(flag_logs: { id: nil })
left_joins('flag_logs ON flag_logs.post_id = posts.id').where('flag_logs.id IS NULL OR flag_logs.is_auto = 0')
})

after_create do
Expand Down

0 comments on commit f80a440

Please sign in to comment.