Browse files

new properties form partial

  • Loading branch information...
1 parent a627992 commit 9483ba99fdaded29e1dfeddde6fd3355fb4184e8 Matt Hodgson committed May 22, 2009
Showing with 11 additions and 11 deletions.
  1. +1 −11 app/views/topics/_form.html.haml
  2. +10 −0 app/views/topics/_property_form.html.haml
View
12 app/views/topics/_form.html.haml
@@ -5,17 +5,7 @@
%br
%br
#properties
- -@topic.properties.each do |property|
- -f.fields_for :properties, property do |pf|
-
- =label_tag property.property_type.name
- %br
- =property_edit pf
- %br
- %br
- =pf.text_field :property_type_id
- %br
- %br
+ =partial 'property_form', :collection => @topic.properties, :builder => f
#property_types
-f.fields_for :property_types do |pt|
View
10 app/views/topics/_property_form.html.haml
@@ -0,0 +1,10 @@
+-builder.fields_for :properties, property_form do |pf|
+
+ =label_tag property_form.property_type.name
+ %br
+ =property_edit pf
+ %br
+ %br
+ =pf.text_field :property_type_id
+ %br
+ %br

0 comments on commit 9483ba9

Please sign in to comment.