Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =simple_form_for(@product) do |f|
- =f.input :name, placeholder: 'Write name product', label: false
- =f.input :description, placeholder: 'Describe the product', label: false, as: :text
- =f.input :category, collection: @category, prompt: 'Select category product', label: false
- =f.input :price
- =f.input :quantity
- #simple_fields_for
- Fields_form
- =f.simple_fields_for :images do |img|
- =f.input :image, as: :file
- =link_to_remove_association "Delete Image", f
- .links
- =link_to_add_association 'add task', f, :images
- =f.button :submit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement