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"
|
sort = "article_categories.name, articles.name"
|
||||||
end
|
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.where('articles.name LIKE ?', "%#{params[:query]}%") unless params[:query].nil?
|
||||||
|
|
||||||
@articles = @articles.page(params[:page]).per(@per_page)
|
@articles = @articles.page(params[:page]).per(@per_page)
|
||||||
|
|
Loading…
Reference in a new issue