Kill trailing whitespace in ruby files

This commit is contained in:
小太
2013-03-19 23:10:10 +11:00
parent c107f96cec
commit cba839ba76
319 changed files with 2710 additions and 2710 deletions

View File

@@ -3,23 +3,23 @@ module Moderator
module Queries
class Upload
attr_reader :user, :count
def self.all(min_date, max_level)
sql = <<-EOS
select uploader_id, count(*)
from posts
join users on uploader_id = users.id
where
posts.created_at > ?
and level <= ?
group by posts.uploader_id
order by count(*) desc
select uploader_id, count(*)
from posts
join users on uploader_id = users.id
where
posts.created_at > ?
and level <= ?
group by posts.uploader_id
order by count(*) desc
limit 10
EOS
ActiveRecord::Base.select_all_sql(sql, min_date, max_level).map {|x| new(x)}
end
def initialize(hash)
@user = ::User.find(hash["uploader_id"])
@count = hash["count"]