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,26 +3,26 @@ module PostSets
module ActiveRecordExtension
attr_accessor :total_pages, :current_page
end
attr_reader :pool, :page
def initialize(pool, page = 1)
@pool = pool
@page = page
end
def offset
(current_page - 1) * limit
end
def limit
Danbooru.config.posts_per_page
end
def tag_array
["pool:#{pool.id}"]
end
def posts
@posts ||= begin
x = pool.posts(:offset => offset, :limit => limit)
@@ -32,27 +32,27 @@ module PostSets
x
end
end
def tag_string
tag_array.join("")
end
def humanized_tag_string
"pool:#{pool.pretty_name}"
end
def presenter
@presenter ||= PostSetPresenters::Pool.new(self)
end
def total_pages
(pool.post_count.to_f / limit).ceil
end
def size
posts.size
end
def current_page
[page.to_i, 1].max
end