app/views/admin/items/_form.html.haml
= form_for @item, url: new_admin_entry_item_path, entry_id: entry_id do |f|
- if @item.errors.any?
#error_explanation
%h2= "#{pluralize(@item.errors.count, "error")} prohibited this item from being saved:"
%ul
- @item.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :name
= f.text_field :name
.field
= f.label :price
= f.number_field :price
.actions
= f.submit 'Save'
.field
= f.fields_for :screenshots, @project.screenshots do |f_screenshot|
= f_screenshot.label :image, :class => 'sm-2' do
Screenshots
.col-sm-10
= f_screenshot.file_field :image, :class => ''