<%- model_class = @content.class; @ancestry = @content.ancestry -%> <%= form_for @content, :html => { :class => 'form-horizontal' } do |f| %> <% if @content.errors.any? %>

ERROR!

<% end %> <%= render :partial => 'fields_new', :locals => {f: f} %> <%= render :partial => 'fields_edit', :locals => {f: f} %>
<%= link_to_add_fields "+ seo", f, :seo unless @content.seo %> <%= f.fields_for :seo do |seo| %> <%= render :partial => 'seo_fields', :locals => {f: seo} %> <% end %>

Resources

<%= link_to_add_fields "Add Resource", f, :resources, '#resources' %>
<%= f.fields_for :resources do |res| %> <%= render :partial => 'resource_fields', :locals => {f: res} %> <% end %>

Children

<%= f.hidden_field :child_order %> <%= link_to_add_fields "Add Child", f, :child_contents, '#children' %>
<%= f.fields_for :child_contents do |child| %> <%= render :partial => 'child_content_fields', :locals => {f: child} %> <% end %>
<%= f.submit nil, :class => 'btn btn-primary' %> <%= link_to t('.cancel', :default => t("helpers.links.cancel")), contents_path, :class => 'btn' %>
<% end %> <% content_for :breadcrumb do %> <%= content_tag :anchor, @content.ancestry %> <% end %>