Prevent stock_articles from appearing in supplier article index
This commit is contained in:
parent
2c9fdcd79e
commit
a511da9ae3
1 changed files with 2 additions and 2 deletions
|
@ -20,7 +20,7 @@ class ArticlesController < ApplicationController
|
|||
sort = "article_categories.name, articles.name"
|
||||
end
|
||||
|
||||
@articles = Article.where(supplier_id: @supplier).includes(:article_category).order(sort)
|
||||
@articles = Article.where(supplier_id: @supplier, :type => nil).includes(:article_category).order(sort)
|
||||
@articles = @articles.where('articles.name LIKE ?', "%#{params[:query]}%") unless params[:query].nil?
|
||||
|
||||
@articles = @articles.page(params[:page]).per(@per_page)
|
||||
|
@ -231,4 +231,4 @@ class ArticlesController < ApplicationController
|
|||
redirect_to supplier_articles_path(@supplier), :notice => "Der Katalog ist aktuell."
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue