ryanb/nested_form — pull request #189 by revis0r (2012-08-10 14:06:38+00:00)
Title: Fix for included nested forms with the same name

*Issue:

= nested_form_for @project do |f|
....
= f.fields_for :options do |option_form|
...
= option_form.fields_for :photos do |photo_form|
...
= option_form.link_to_add 'Add photo to option', :photos
= f.link_to_add 'Add option', :options
...
= f.fields_for :photos do |photo_form|
= f.link_to_add 'Add photo to project', :photos

Gem will create only 2 templates 'photos_fields_blueprint' and 'options_fields_blueprint'. So, adding photos to project will not work, because it will use template of "adding photo to option" .

This patch naming templates with form object class name and association name, that solves the problem.
Sorry for my English.