fixes #400
This commit is contained in:
@@ -63,7 +63,7 @@ private
|
|||||||
end
|
end
|
||||||
|
|
||||||
def index_by_post
|
def index_by_post
|
||||||
@posts = Post.commented_before(Time.now).tag_match(params[:tags]).order("posts.id desc").paginate(params[:page], :limit => 5)
|
@posts = Post.commented_before(Time.now).tag_match(params[:tags]).paginate(params[:page], :limit => 5)
|
||||||
respond_with(@posts) do |format|
|
respond_with(@posts) do |format|
|
||||||
format.html {render :action => "index_by_post"}
|
format.html {render :action => "index_by_post"}
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ForumPostsController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
@search = ForumPost.active.search(params[:search])
|
@search = ForumPost.active.search(params[:search])
|
||||||
@forum_posts = @search.paginate(params[:page]).order("forum_posts.id desc")
|
@forum_posts = @search.paginate(params[:page]).order("forum_posts.id DESC")
|
||||||
respond_with(@forum_posts)
|
respond_with(@forum_posts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class TagSubscription < ActiveRecord::Base
|
|||||||
|
|
||||||
def process
|
def process
|
||||||
post_ids = tag_query_array.inject([]) do |all, tag|
|
post_ids = tag_query_array.inject([]) do |all, tag|
|
||||||
all += Post.tag_match(tag).limit(Danbooru.config.tag_subscription_post_limit / 3).select("posts.id").order("posts.id desc").map(&:id)
|
all += Post.tag_match(tag).limit(Danbooru.config.tag_subscription_post_limit / 3).select("posts.id").order("posts.id DESC").map(&:id)
|
||||||
end
|
end
|
||||||
self.post_ids = post_ids.sort.reverse.slice(0, Danbooru.config.tag_subscription_post_limit).join(",")
|
self.post_ids = post_ids.sort.reverse.slice(0, Danbooru.config.tag_subscription_post_limit).join(",")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= sequential_paginator(@posts) %>
|
<%= numbered_paginator(@posts) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user