Permalink
Browse files

Rails 2 & 3 compatible form generator templates (GH-472):

* updated Rails 3 generator templates to use = for outputing blocks
* created alternate Rails 2 templates with old block syntax
* pointed Rails 2 generator at appropriate templates
  • Loading branch information...
1 parent 772bf40 commit 029f75844c4e79e3ff34929b465a32d0eb46a02d @justinfrench committed Dec 17, 2010
@@ -105,7 +105,7 @@ def banner
end
def source_root
- File.expand_path('../../../lib/generators/templates', __FILE__)
+ File.expand_path('../../../lib/generators/templates/rails2', __FILE__)
end
end
@@ -1,4 +1,4 @@
-<%% f.inputs do %>
+<%%= f.inputs do %>
<% attributes.each do |attribute| -%>
<%%= f.input :<%= attribute.name %> %>
<% end -%>
@@ -1,4 +1,4 @@
-- f.inputs do
+= f.inputs do
<% attributes.each do |attribute| -%>
= f.input :<%= attribute.name %>
<% end -%>
@@ -0,0 +1,5 @@
+<%% f.inputs do %>
+<% attributes.each do |attribute| -%>
+ <%%= f.input :<%= attribute.name %> %>
+<% end -%>
+<%% end %>
@@ -0,0 +1,4 @@
+- f.inputs do
+<% attributes.each do |attribute| -%>
+ = f.input :<%= attribute.name %>
+<% end -%>

0 comments on commit 029f758

Please sign in to comment.