修改ignore/category/license/language的index筛选问题
This commit is contained in:
parent
d97dd700a0
commit
4595cac2d9
|
@ -1,5 +1,7 @@
|
||||||
class IgnoresController < ApplicationController
|
class IgnoresController < ApplicationController
|
||||||
def index
|
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
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
class LicensesController < ApplicationController
|
class LicensesController < ApplicationController
|
||||||
def index
|
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
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
class ProjectCategoriesController < ApplicationController
|
class ProjectCategoriesController < ApplicationController
|
||||||
def index
|
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
|
end
|
||||||
|
|
||||||
def group_list
|
def group_list
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
class ProjectLanguagesController < ApplicationController
|
class ProjectLanguagesController < ApplicationController
|
||||||
def index
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue