<%= form_for @map, html: { multipart: true, class: 'square' } do |f| %> <%= render 'shared/errors', messages: @map.errors.full_messages %>
<%= f.label :name %> <%= f.text_field :name %>
<%= f.label :category_id %> <%= f.select :category_id, Category.ordered.domain(Category::DOMAIN_GAMES).collect { |c| [c, c.id] } %>
<%= f.label :download %> <%= f.text_field :download %>
<%= f.label :picture %>
<% if @map.picture&.file&.exists? %> <%= image_tag @map.picture.url %>
<% end %> <%= f.file_field :picture %>
<%= f.submit 'Update Map' %>
<% end %>