Displaying 1 result from an estimated 1 matches for "employee_phone_numbers".
Did you mean:
employee_phone_number
2006 Jul 05
0
Javascript repeating fields.
...initely do it, but it gets kinda messy and I want to use partials
for the repeating fields, but I can''t figure out how to do it in a DRY way.
Anyone got any ideas?
Here''s a concrete example:
Say you have a couple of database tables like this:
employees:
id
name
date_of_hire
employee_phone_numbers:
id
employee_id
phone_number
Now, say I want a page for editing an employee. Here''s a template:
edit.rhtml
<% form_for :employee, @employee, :url => {:action => ''update} do |f| %>
<%= f.text_field name %>
<%= f.date_of_hire %>
<input type="...