<%= render 'pulitzer/shared/error_messages', object: post %> <%= form_for post, html: ajax_form_hash('#posts_container', insert_method: 'prepend', error_target: '#new_post') do |f| %> <%= f.label :title %> <%= f.text_field :title %> <%= f.hidden_field :post_type_version_id %> <%= f.submit %> <%= link_to('Cancel', '#', :class => 'button', data: { emptier: true, target: '#new_post' } ) %> <% end %>