修改ignore/category/license/language的index筛选问题

This commit is contained in:
sylor_huang@126.com 2020-05-09 17:14:23 +08:00
parent d97dd700a0
commit 4595cac2d9
4 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,7 @@
class IgnoresController < ApplicationController
def index
@ignores = Ignore.search(params[:name]).without_content
#@ignores = Ignore.search(params[:name]).without_content
q = Ignore.ransack(name_cont: params[:name])
@ignores = q.result(distinct: true)
end
end

View File

@ -1,5 +1,7 @@
class LicensesController < ApplicationController
def index
@licenses = License.search(params[:name]).without_content
#@licenses = License.search(params[:name]).
q = License.ransack(name_cont: params[:name])
@licenses = q.result(distinct: true)
end
end

View File

@ -1,6 +1,8 @@
class ProjectCategoriesController < ApplicationController
def index
@project_categories = ProjectCategory.search(params[:name]).without_content
# @project_categories = ProjectCategory.search(params[:name]).without_content
q = ProjectCategory.ransack(name_cont: params[:name])
@project_categories = q.result(distinct: true)
end
def group_list

View File

@ -1,5 +1,7 @@
class ProjectLanguagesController < ApplicationController
def index
@project_languages = ProjectLanguage.search(params[:name]).without_content
#@project_languages = ProjectLanguage.search(params[:name]).
q = ProjectLanguage.ransack(name_cont: params[:name])
@project_languages = q.result(distinct: true)
end
end