forked from e621ng/e621ng
fixes #911
This commit is contained in:
parent
bbee928f7e
commit
34d7e337ac
@ -16,7 +16,7 @@ class WikiPagesController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
@wiki_pages = WikiPage.search(params[:search]).order("id desc").paginate(params[:page], :search_count => params[:search])
|
||||
@wiki_pages = WikiPage.search(params[:search]).order("updated_at desc").paginate(params[:page], :search_count => params[:search])
|
||||
respond_with(@wiki_pages) do |format|
|
||||
format.html do
|
||||
if @wiki_pages.count == 1
|
||||
|
@ -0,0 +1,5 @@
|
||||
class AddUpdatedAtIndexToWikiPages < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :wiki_pages, :updated_at
|
||||
end
|
||||
end
|
@ -6045,6 +6045,13 @@ CREATE UNIQUE INDEX index_wiki_pages_on_title ON wiki_pages USING btree (title);
|
||||
CREATE INDEX index_wiki_pages_on_title_pattern ON wiki_pages USING btree (title text_pattern_ops);
|
||||
|
||||
|
||||
--
|
||||
-- Name: index_wiki_pages_on_updated_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE INDEX index_wiki_pages_on_updated_at ON wiki_pages USING btree (updated_at);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
@ -6244,4 +6251,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130307225324');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130308204213');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130318002652');
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130318002652');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130318012517');
|
Loading…
Reference in New Issue
Block a user