@@ -241,9 +241,11 @@ class Pool < ActiveRecord::Base
|
|||||||
limit = options[:limit] || Danbooru.config.posts_per_page
|
limit = options[:limit] || Danbooru.config.posts_per_page
|
||||||
slice = post_id_array.slice(offset, limit)
|
slice = post_id_array.slice(offset, limit)
|
||||||
if slice && slice.any?
|
if slice && slice.any?
|
||||||
Post.where("id in (?)", slice).order(arbitrary_sql_order_clause(slice, "posts"))
|
slice.map do |id|
|
||||||
|
Post.find(id)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Post.where("false")
|
[]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user