を与えることはできません、私はまだこれが壊れた理由については不明だ:ハム壊れ。違法ネスティング:コンテンツの両方が同じ行に
.form-box
%h3 Restrictions
%legend Restricted Locations
= form_for [:blueadmin, :wine, @wine], html: {class: 'form-horizontal col-lg-2'} do |f|
%fieldset.inputs
.control-group
= f.label :us_states, "US States", class: 'control-label'
.controls
= f.collection_select :product, Restriction.all, :us_state, :us_state, {}, :multiple => 'true'
%fieldset
%ol
%li.button
= f.submit "Submit", class: 'btn btn-primary'
%table.table.table-hover.table-condensed.story-list
%th State
%th Remove
私が手にエラーがある: Illegal nesting: content can't be both given on the same line as %legend and nested within it.
= form_for
があると思われます犯人
私は制限された場所が%legendと同じ行にあることを理解していますが、それがドキュメントの表示方法です。
しかしこれは動作しますが、それネジアップ私の凡例のボーダー:
.form-box
%h3 Restrictions
%legend
Restricted Locations
= form_for [:blueadmin, :wine, @wine], html: {class: 'form-horizontal col-lg-2'} do |f|
%fieldset.inputs
.control-group
= f.label :us_states, "US States", class: 'control-label'
.controls
= f.collection_select :product, Restriction.all, :us_state, :us_state, {}, :multiple => 'true'
%fieldset
%ol
%li.button
= f.submit "Submit", class: 'btn btn-primary'
%table.table.table-hover.table-condensed.story-list
%th State
%th Remove
それは次のようになります。これに代えて
(方法に注意してください細い線は別の場所にあります)
最後に、フォームの右側に下の表が表示されるようにするにはどうすればよいですか?これを行うにはどうすればよいですか?
にくぼみの結果の変更は、私はあなたが何をすべきかわからないので HAMLはインデントで動作します:あなたのケースでは、巣
Restricted Locations
テキストだけでなく、form
注意しようとしています'= form_for'です。 hamlで 'form_for'を使うときはいつでも' - form_for'です。 – stef