remove outer label of checkbox in ruby -


i'm using ruby on project . need custom style check boxes.

please find below code

<%= f.input :category_ids, :as => :check_boxes %>   <%= f.collection_check_boxes :category_ids, category.order(:name), :id, :name |b|     b.label { b.check_box + b.text }   end %> <% end %> 

using above code im getting out

<label for="property_space_amenities_space_amenities_2">   <input type="checkbox" value="2" name="property[space_amenities][space_amenities][]" id="property_space_amenities_space_amenities_2">internet connectivity </label> 

form im not able give custom style this

i want output below

<label class="control-label" for="user_login">login</label> <input class="form-control" id="user_login" name="user[login]" type="text" /> 

please me in this

according rails doc, can have separated label , checkbox not using "do" block.

<%= f.collection_check_boxes :category_ids, category.order(:name), :id, :name %> 

btw, rails >= 4.0.2, maybe can remove rails 3 tag.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -