You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So every time I download this plugin I change the formtastic form generator to use |f| in place of |form| for it's iterator variable. This lets the snippets in the Formtastic and Rails bundles work with these forms. It's a simple fix-- here's the diff. What's the reason for using |form|?
diff --git a/generators/form/templates/view__form.html.erb b/generators/form/templates/view__form.html.erb
index d444c3c..21daaab 100644
--- a/generators/form/templates/view__form.html.erb
+++ b/generators/form/templates/view__form.html.erb
@@ -1,5 +1,5 @@
-<%% form.inputs do %>
+<%% f.inputs do %>
<% attributes.each do |attribute| -%>
<%%= f.input :<%= attribute.name %>, :label => '<%= attribute.name.humanize %>' %>
<% end -%>
<%% end %>
\ No newline at end of file
diff --git a/generators/form/templates/view__form.html.haml b/generators/form/templates/view__form.html.haml
index 52b2fa9..5e06093 100644
--- a/generators/form/templates/view__form.html.haml
+++ b/generators/form/templates/view__form.html.haml
@@ -1,4 +1,4 @@
-- form.inputs do
+- f.inputs do
<% attributes.each do |attribute| -%>
So every time I download this plugin I change the formtastic form generator to use |f| in place of |form| for it's iterator variable. This lets the snippets in the Formtastic and Rails bundles work with these forms. It's a simple fix-- here's the diff. What's the reason for using |form|?
diff --git a/generators/form/templates/view__form.html.erb b/generators/form/templates/view__form.html.erb
index d444c3c..21daaab 100644
--- a/generators/form/templates/view__form.html.erb
+++ b/generators/form/templates/view__form.html.erb
@@ -1,5 +1,5 @@
-<%% form.inputs do %>
+<%% f.inputs do %>
<% attributes.each do |attribute| -%>
<% end -%>
<%% end %>
\ No newline at end of file
diff --git a/generators/form/templates/view__form.html.haml b/generators/form/templates/view__form.html.haml
index 52b2fa9..5e06093 100644
--- a/generators/form/templates/view__form.html.haml
+++ b/generators/form/templates/view__form.html.haml
@@ -1,4 +1,4 @@
-- form.inputs do
+- f.inputs do
<% attributes.each do |attribute| -%>
<% end -%>
\ No newline at end of file
The text was updated successfully, but these errors were encountered: