Merge pull request #347 from foodcoop1040/suppliers_with_articles

Show only suppliers with articles in the dropdown-menu for new orders
This commit is contained in:
wvengen 2015-02-18 23:42:37 +01:00
commit 27fe8a4d42
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@
= t '.new_order'
%span.caret
%ul.dropdown-menu
- Supplier.undeleted.order('suppliers.name ASC').each do |supplier|
- Supplier.where(id: Article.undeleted.select(:supplier_id).distinct).order('suppliers.name ASC').each do |supplier|
%li= link_to supplier.name, new_order_path(supplier_id: supplier.id), tabindex: -1
.well