<%- if resource_administrated?(relationship_class) && relationship_class.respond_to?(:autocomplete_attribute) && relationship_class.autocomplete_attribute.present? -%> <%= form_tag relate_to_url(object), :class => 'relate-to-form', :method => :put do %>

Add a <%= relationship_class.model_name.human %>

<%= hidden_field_tag 'relationship_name', relationship %>
  1. <%= hidden_field_tag 'related_id', nil, :class => 'token-input', 'data-model-name' => relationship_class.model_name.singular %>
  2. <%= submit_tag "Add #{relationship_class.model_name.human}" %>
<% end %> <%- end -%>