From 494d3af9a4acc7f817560e603fa1760ba46ee351 Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 16 Jul 2014 15:16:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=B4=E5=90=A7=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/forums_controller.rb | 6 +++--- db/schema.rb | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 3b8b4b928..9c41f91d6 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -50,14 +50,14 @@ class ForumsController < ApplicationController def index @offset, @limit = api_offset_and_limit({:limit => 10}) - @forums_all = Forum.all + @forums_all = Forum.where('1=1') @forums_count = @forums_all.count @forums_pages = Paginator.new @forums_count, @limit, params['page'] @offset ||= @forums_pages.offset - # @forums = @forums_all.offset(@offset).limit(@limit).all - @forums = Forum.all + @forums = @forums_all.offset(@offset).limit(@limit).all + #@forums = Forum.all respond_to do |format| format.html # index.html.erb format.json { render json: @forums } diff --git a/db/schema.rb b/db/schema.rb index 6134f1601..ac5ca0644 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -770,6 +770,7 @@ ActiveRecord::Schema.define(:version => 20140716021558) do t.boolean "hidden_repo", :default => false, :null => false t.integer "attachmenttype", :default => 1 t.integer "user_id" + t.integer "dts_test", :default => 0 end add_index "projects", ["lft"], :name => "index_projects_on_lft"