Sha256: 48455e3c049377d83a35e5109210fb53330d1e32450026259b6ee089ac0e4b96

Contents?: true

Size: 1015 Bytes

Versions: 4

Compression:

Stored size: 1015 Bytes

Contents

<%- 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 %>
    <fieldset class="inputs">
      <h4>Add a <%= relationship_class.model_name.human %></h4>
      <%= hidden_field_tag 'relationship_name', relationship %>
      <ol>
        <li class="label">
          <label for="related_id">
            <%= relationship_class.model_name.human %>
            <%= relationship_class.human_attribute_name(relationship_class.autocomplete_attribute) %>
          </label>
        </li>
        <li class="input">
          <%= hidden_field_tag 'related_id', nil, :class => 'token-input',
            'data-model-name' => relationship_class.model_name.singular %>
        </li>
        <li class="button"><%= submit_tag "Add #{relationship_class.model_name.human}" %></li>
      </ol>
    </fieldset>
  <% end %>
<%- end -%>

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
activeadmin_associations-0.1.3 app/views/admin/shared/_add_to_association.html.erb
aa_associations-0.1.2 app/views/admin/shared/_add_to_association.html.erb
aa_associations-0.1.1 app/views/admin/shared/_add_to_association.html.erb
aa_associations-0.1.0 app/views/admin/shared/_add_to_association.html.erb