Listing 2. views/meetings/new.html.erb, Modified from the Default Scaffold to Allow the User to Enter One or More People

New meeting

<% form_for(@meeting) do |f| %> <%= f.error_messages %>

<%= f.label :starting_at %>
<%= f.datetime_select :starting_at %>

<%= f.label :ending_at %>
<%= f.datetime_select :ending_at %>

<%= f.label :location %>
<%= f.text_area :location %>

With: <%= select("person", "person_id", Person.all.collect { |p| [p.fullname, p.id] }, {}, {:multiple => true}) %>

<%= f.submit 'Create' %>

<% end %> <%= link_to 'Back', meetings_path %>