diff --git a/app/controllers/ignores_controller.rb b/app/controllers/ignores_controller.rb new file mode 100644 index 000000000..2afe28e27 --- /dev/null +++ b/app/controllers/ignores_controller.rb @@ -0,0 +1,5 @@ +class IgnoresController < ApplicationController + def index + @ignores = Ignore.search(params[:name]).without_content + end +end diff --git a/app/models/ignore.rb b/app/models/ignore.rb index 91c743735..bd75ed08c 100644 --- a/app/models/ignore.rb +++ b/app/models/ignore.rb @@ -1,2 +1,3 @@ class Ignore < ApplicationRecord + include Projectable end diff --git a/app/views/ignores/index.json.jbuilder b/app/views/ignores/index.json.jbuilder new file mode 100644 index 000000000..a60ea7006 --- /dev/null +++ b/app/views/ignores/index.json.jbuilder @@ -0,0 +1 @@ +json.ignores @ignores, :id, :name diff --git a/config/routes.rb b/config/routes.rb index a24a9d658..e58d43b86 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,4 @@ Rails.application.routes.draw do - get 'project_languages/index' require 'sidekiq/web' require 'admin_constraint' mount Sidekiq::Web => '/sidekiq', :constraints => AdminConstraint.new @@ -25,6 +24,7 @@ Rails.application.routes.draw do resources :project_categories, only: [:index, :show] resources :project_languages, only: [:index, :show] + resources :ignores, only: [:index, :show] # resources :memos do # member do