搜索课程

This commit is contained in:
yuanke 2016-10-09 16:10:33 +08:00
parent c4de8cf948
commit 9ca685ea94
2 changed files with 1 additions and 5 deletions

View File

@ -183,9 +183,7 @@ class WelcomeController < ApplicationController
when 'user'
@users = User.search(@name).page(params[:page] || 1).per(20)
when 'syllabus'
@syllabuses = Syllabus.search(@name).page(params[:page] || 1).per(20)
logger.info "input_syllabus"
logger.info @syllabuses[0]
@syllabuses = Syllabus.search(@name).page(params[:page] || 1).per(20).results
when 'project'
@projects = Project.search(@name).page(params[:page] || 1).per(20).results
when 'course'

View File

@ -26,8 +26,6 @@
<div class="cl"></div>
</ul>
<% when 'syllabus'%>
<% logger.info "input_item" %>
<% logger.info item %>
<ul class="searchContent w968">
<li class="f16 mb5 fontGrey3">
<a href="<%= syllabus_path(item.id)%>" class="fontGrey3 fl"><%= item.try(:highlight).try(:title) ? item.highlight.title[0].html_safe : item.title %>课程</a>