Skip to content

Issue multiple invitations

Justin Tomich edited this page Apr 22, 2016 · 2 revisions

You can issue multiple invitations to the same resource at once. The field email becomes emails, and set multiple:true.

<div id="invitation" class="new">

  <p>
    Issue an invitation to join <%= @invite.invitable.invitable_name %>
  </p>

  <%= form_for @invite, url: invites_path do |f| %>
      <%= f.hidden_field :invitable_id, value: @invite.invitable_id %>
      <%= f.hidden_field :invitable_type, value: @invite.invitable_type %>

      <%= f.label :emails %>
      <%= f.email_field :emails, multiple: true %>

      <%= f.label :emails %>
      <%= f.email_field :emails, multiple: true %>

      <%= f.label :emails %>
      <%= f.email_field :emails, multiple: true %>

      <%= f.submit 'Send' %>
  <% end %>

</div>
Clone this wiki locally