Ich habe ein einfaches Formtastic-Formular mit folgendem verschachtelten Modell.
<%= semantic_form_for @event do |form| %>
<%= form.input :user_id , :as => :hidden, :value => @user.id %>
<%= form.input :title %>
<%= form.input :invitations, :as => :check_boxes, :collection => Group.find(:all, :order => "name ASC"), :for => :invitations, :name => "Invitation", :include_blank => false %>
<%= form.buttons %>
<% end %>
Irgendwie stellt Formtastic meine Eingaben wie folgt in eine ungeordnete Liste:
Ich frage mich, wie ich die Einstellung ändern kann, um dies zu beheben.
Außerdem fügt Formtastic für das Kontrollkästchen automatisch eine Null-Option hinzu:
Parameters: {"utf8"=>"", "authenticity_token"=>"XXX", "event"=>{"title"=>"test 15", "type"=>"", "invitation_ids"=>["", "2", "1"]}, "commit"=>"Create Event"}
Wie soll ich das beheben?
Ich danke Ihnen.