Browse Source

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

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
4595cac2d9
4 changed files with 12 additions and 4 deletions
  1. +3
    -1
      app/controllers/ignores_controller.rb
  2. +3
    -1
      app/controllers/licenses_controller.rb
  3. +3
    -1
      app/controllers/project_categories_controller.rb
  4. +3
    -1
      app/controllers/project_languages_controller.rb

+ 3
- 1
app/controllers/ignores_controller.rb 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

+ 3
- 1
app/controllers/licenses_controller.rb 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

+ 3
- 1
app/controllers/project_categories_controller.rb 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


+ 3
- 1
app/controllers/project_languages_controller.rb 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

Loading…
Cancel
Save