diff --git a/app/controllers/ignores_controller.rb b/app/controllers/ignores_controller.rb index 2afe28e27..5eeba5b0d 100644 --- a/app/controllers/ignores_controller.rb +++ b/app/controllers/ignores_controller.rb @@ -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 diff --git a/app/controllers/licenses_controller.rb b/app/controllers/licenses_controller.rb index 8639d7f32..6e3ee8f0e 100644 --- a/app/controllers/licenses_controller.rb +++ b/app/controllers/licenses_controller.rb @@ -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 diff --git a/app/controllers/project_categories_controller.rb b/app/controllers/project_categories_controller.rb index 9a113c449..116a79281 100644 --- a/app/controllers/project_categories_controller.rb +++ b/app/controllers/project_categories_controller.rb @@ -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 diff --git a/app/controllers/project_languages_controller.rb b/app/controllers/project_languages_controller.rb index bd6848b81..7f7e8bf75 100644 --- a/app/controllers/project_languages_controller.rb +++ b/app/controllers/project_languages_controller.rb @@ -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