Strangely, this code...

  <% f.semantic_fields_for :options do |c| %>
    <% @document.options.each do |option| %>
      <%= c.input :value, :label => option.name, :hint => option.hint
%>
    <% end %>
  <% end %>

... end's up posting the names, the form fields and the hints twice.
Also it seems that they are now somehow outside of Formtastic's reach
as it is showing bullet-points.

See: http://ils.unc.edu/~muela/first.png

Switching it around, like so...

  <% @document.options.each do |option| %>
    <% f.semantic_fields_for :options, option do |c| %>
      <%= c.input :value, :label => option.name, :hint => option.hint
%>
    <% end %>
  <% end %>

...shows it only once, but still not within the Formtastic <ul>'s. So
each item still gets shown as a <li> with its own bullet point. Also
it's not getting the css through Formtastic like a normal
semantic_fields_for setup would.

See:: http://ils.unc.edu/~muela/second.png

This is getting somewhere though. Wonder if there's some way to get
that last bit fixed.

Any help would be greatly appreciate it. I really figured that I would
just have been able to do something like ":label => :name" or ":label
=> option.name" without having to resort to the
"@document.options.each do" bit, which I think is breaking the
Formtastic magic.

Please help.
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to