I've solved the issue, but it sure seems like a hack. Hopefully someone can 
help with a more elegant approach. It seems like I'm missing something 
simple, all I need to do is display a name.

<%= form_for @physician do |f| %>
<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>

<hr>
<h3>Patient appointments:</h3>
<table>
<tr><th>Patient Name</th><th>Appointment Date</th><th></th></tr>
 *<% appt_index = 0 %>*
<%= f.fields_for :appointments do |appointment| %>
<tr>
<td>
*<%= @physician.appointments[appt_index].patient.name %> *
</td>
<td>
%= appointment.text_field :appointment_date %>
</td>
</tr>
*<% appt_index = appt_index + 1 %>*
<% end %>
</table>
<hr>

<p><%= f.submit %></p>
<% end %>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to