Trying to use CSSFormBuilder, but having a problem with its
css_fields_for wrapper. When I check out the code, there''s a fairly
important-looking line commented out. Is anyone using this? Is that
method broken, or have I just not figured it out, yet? If you aren''t
using this, what other good form builders are there?
Here''s what I have:
<%= error_messages_for ''customer'' %>
<!--[form:customer]-->
<% fieldset_tag ''General Data'' do %>
<%= @f.text_field :name, :class=>''double-size'' %>
<%= @f.text_field :ein, :class=>''normal-size'' %>
<br />
<%= @f.text_field :product, :class=>''double-size''
%>
<br />
<% end %>
<%= error_messages_for ''address''%>
<% fieldset_tag ''Address'' do %>
<% css_fields_for :address, do |addr| %>
<%= addr.text_field :street, :class=>''normal-size''
%>
<br />
<%= addr.text_field :city, :class=>''normal-size'' %>
<br />
<%= addr.text_field :zip, :class=>''quarter-size'' %>
<%= addr.text_field :state, :class=>''normal-size''
%>
<br />
<%= addr.text_field :county, :class=>''normal-size''
%>
<%= addr.text_field :country, :class=>''normal-size''
%>
<% end %>
<% end %>
<!--[eoform:customer]-->
Here''s the error I get in my Customer.new method:
compile error
script/../config/../app/views/customers/_form.rhtml:12: parse error,
unexpected kDO_BLOCK
_erbout.concat "\t"; css_fields_for :address, do |addr| ;
_erbout.concat "\n"
^
script/../config/../app/views/customers/_form.rhtml:25: parse error,
unexpected kEND, expecting $
Extracted source (around line #12):
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---