ruby on rails - simple form adds div -


i'm trying customize simple form (for semantic-ui) creating own wrapper. looks simple keeps adding div around every input (and wrapper).

<div class="float optional recipe_yield"> 

this custom wrapper:

  config.wrappers :semantic |b|     b.use :html5     b.use :placeholder      b.wrapper tag: :div, class: :field |c|       c.use :label_input     end   end 

i expect f.input :name result in this:

<div class="field">   <label class="string optional" for="recipe_name">name</label>   <input class="string optional" name="recipe[name]"   id="recipe_name"type="text"> </div> 

instead this:

<div class="string optional recipe_name">     <div class="field">       <label class="string optional" for="recipe_name">name</label>       <input class="string optional" name="recipe[name]"   id="recipe_name"type="text">     </div> </div> 

how rid of <div class="string optional recipe_name">? don't want simple form add that. or possibly have simple form include 'field' class in div.

so manged simple form add 'field' 1 of classes in div surrounding label , input. have pass in option when call config.wrappers.

  config.wrappers :semantic, tag: 'div', class: 'field' |b|     b.use :html5      b.use :placeholder     b.use :label_input   end 

as can see removed b.wrapper. otherwise add div around label , input still within

<div class="float optional recipe_yield"> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -