From 0e56a79622e78faad107c8fba7613fd21f771929 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Jul 2015 11:50:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=B8=8D=E4=BD=BF=E7=94=A8ajax=E5=B1=80=E9=83=A8?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/news_controller.rb | 3 +-- app/views/news/_course_news.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 9385c73ee..848c0a69d 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -71,8 +71,7 @@ class NewsController < ApplicationController scope = @course ? @course.news.course_visible : News.course_visible @news_count = scope.count - #@news_pages = Paginator.new @news_count, @limit, params['page'] - #@offset ||= scope_page.offset + @q = params[:subject] if params[:subject].nil? scope_order = scope.all(:include => [:author, :course], :order => "#{News.table_name}.created_on DESC") diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb index f801aff87..e2c50fe24 100644 --- a/app/views/news/_course_news.html.erb +++ b/app/views/news/_course_news.html.erb @@ -24,8 +24,8 @@ <% end %>