Edit <%= @job._type %>
<% if @job.errors.present? %>
Failed to save the changes! <% @job.errors.messages.each_pair do |field, message| %>
<%= field.to_s.humanize %> is not valid: <%= message.join(', ') %>
<% end %>
<% end %> <%= form_for(@job, as: :job, url: job_path(@job)) do |f| %>
<% @job.class.user_editable_fields.each do |property_name| %> <%= f.label property_name.to_s %> <%= editable_field_html(@job.class, property_name, @job.send(property_name), f) %> <% end %>
<% if @job.class.respond_to?(:defined_input_categories) && @job.class.respond_to?(:defined_output_categories) %>
Input Categories
<%= f.fields_for :input_categories do |i| %> <%= render "input_category_fields.html", f: i %> <% end %>
Output Categories
<%= f.fields_for :output_categories do |o| %> <%= render "output_category_fields.html", f: o %> <% end %>
<% end %>
<%= f.submit 'Save', class: 'btn btn-primary' %> <%= link_to 'Cancel', :back, class: 'btn btn-default' %>
<% end %>