Advertisement
Guest User

Untitled

a guest
Aug 18th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.58 KB | None | 0 0
  1. =simple_form_for(@product) do |f|
  2.   =f.input :name,         placeholder: 'Write name product', label: false
  3.   =f.input :description,  placeholder: 'Describe the product', label: false, as: :text
  4.   =f.input :category,     collection: @category, prompt: 'Select category product', label: false
  5.   =f.input :price
  6.   =f.input :quantity
  7.   #simple_fields_for
  8.     Fields_form
  9.     =f.simple_fields_for :images do |img|
  10.       =f.input :image, as: :file
  11.       =link_to_remove_association "Delete Image", f
  12.       .links
  13.       =link_to_add_association 'add task', f, :images
  14.   =f.button :submit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement