Edit Product

<%= form_for(:product, url: seller_update_product_path) do |f| %> <%= render 'rails_marketplace/shared/product_error_messages' %> <%= f.label :title %> <%= f.text_field :title, class: 'form-control', value: @product.title %> <%= f.label :description %> <%= f.text_area :description, class: 'form-control wysihtml5', value: @product.description %> <%= f.label :price %> <%= f.text_field :price, class: 'form-control', value: @product.price %> <%= f.label :quantity %> <%= f.text_field :quantity, class: 'form-control', value: @product.quantity %> <%= f.label :images %>
    <% @product.images.each do |image| %>
  • <%= image_tag(image.thumb.url) %>
  • <% end %>
<%= f.file_field :images, multiple: true %> <%= f.label :categories %> <% RailsMarketplace::Category.walk_tree do |cat, level| level%>
checked<% end %>><%="#{'-' * level} #{cat.name}"%> <% end %>

<%= f.submit "Submit", class: "btn btn-primary" %> <% end %>