Alphabetise suppliers when adding new product

This commit is contained in:
Rohan Mitchell
2014-02-27 11:33:02 +11:00
parent 3196e28d88
commit 8bb742b3f2

View File

@@ -2,7 +2,7 @@
.alpha.six.columns
= f.field_container :supplier do
= f.label :supplier
= f.collection_select(:supplier_id, Enterprise.is_primary_producer.managed_by(spree_current_user), :id, :name, {:include_blank => true}, {:class => "select2 fullwidth"})
= f.collection_select(:supplier_id, Enterprise.is_primary_producer.managed_by(spree_current_user).by_name, :id, :name, {:include_blank => true}, {:class => "select2 fullwidth"})
= f.error_message_on :supplier
.four.columns
= f.field_container :group_buy do
@@ -17,4 +17,4 @@
.omega.six.columns
= f.field_container :group_buy_unit_size do
= f.label :group_buy_unit_size
= f.text_field :group_buy_unit_size, :class => "fullwidth"
= f.text_field :group_buy_unit_size, :class => "fullwidth"