From 2052d36abe60b5800772ee63f202d4c8541f93af Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 24 Apr 2014 08:46:10 +0800 Subject: [PATCH] issue:socialForge#381 --- app/controllers/projects_controller.rb | 4 ++-- app/views/layouts/base_memos.html.erb | 2 +- app/views/layouts/base_projects.html.erb | 2 +- app/views/projects/course.html.erb | 2 +- app/views/projects/index.html.erb | 2 +- app/views/projects/search.html.erb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index cf7e9589..40568905 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -227,8 +227,8 @@ class ProjectsController < ApplicationController def search #modified by nie - project_type = params[:project_type] - projects_all = (project_type.eql? Project::ProjectType_project) ? Project.project_entities : Project.course_entities + project_type = params[:project_type].to_i + projects_all = (project_type.eql? Project::ProjectType_course) ? Project.course_entities : Project.project_entities @projects = projects_all.visible @projects = @projects.visible.like(params[:name]) if params[:name].present? @offset, @limit = api_offset_and_limit({:limit => 10}) diff --git a/app/views/layouts/base_memos.html.erb b/app/views/layouts/base_memos.html.erb index 4b7f4b96..b033a81c 100644 --- a/app/views/layouts/base_memos.html.erb +++ b/app/views/layouts/base_memos.html.erb @@ -33,7 +33,7 @@ <%= l(:label_user_location) %> :