Kill trailing whitespace in ruby files
This commit is contained in:
@@ -6,22 +6,22 @@ module Moderator
|
||||
|
||||
def self.all(min_date)
|
||||
sql = <<-EOS
|
||||
SELECT post_flags.post_id, count(*)
|
||||
FROM post_flags
|
||||
JOIN posts ON posts.id = post_flags.post_id
|
||||
WHERE
|
||||
post_flags.created_at > ?
|
||||
AND post_flags.reason <> ?
|
||||
SELECT post_flags.post_id, count(*)
|
||||
FROM post_flags
|
||||
JOIN posts ON posts.id = post_flags.post_id
|
||||
WHERE
|
||||
post_flags.created_at > ?
|
||||
AND post_flags.reason <> ?
|
||||
AND posts.is_deleted = false
|
||||
and posts.is_pending = false
|
||||
GROUP BY post_flags.post_id
|
||||
ORDER BY count(*) DESC
|
||||
GROUP BY post_flags.post_id
|
||||
ORDER BY count(*) DESC
|
||||
LIMIT 10
|
||||
EOS
|
||||
|
||||
ActiveRecord::Base.select_all_sql(sql, min_date, "Unapproved in three days").map {|x| new(x)}
|
||||
end
|
||||
|
||||
|
||||
def initialize(hash)
|
||||
@post = Post.find(hash["post_id"])
|
||||
@count = hash["count"]
|
||||
|
||||
Reference in New Issue
Block a user