2015-09-25 14:24:32 +02:00
|
|
|
= f_form_for @product, html: { multipart: true } do |f|
|
|
|
|
= f.error_messages
|
|
|
|
= f.text_field :name
|
|
|
|
= f.price_field :price
|
|
|
|
= f.collection_select :category, Product.categories.keys
|
|
|
|
= f.number_field :stock
|
|
|
|
= f.number_field :calories
|
|
|
|
= f.file_field :avatar
|
|
|
|
= f.fields_for :barcodes do |ff|
|
|
|
|
= ff.number_field :code, readonly: true
|
|
|
|
= f.submit
|