Created
September 6, 2013 09:53
-
-
Save adamico/6461806 to your computer and use it in GitHub Desktop.
SimpleForm inline collection radio_buttons/checkboxes for Twitter Bootstrap 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#app/inputs/collection_check_boxes_input.rb | |
class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput | |
def item_wrapper_class | |
"checkbox-inline" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#radio buttons in horizontal form version with label in a length=2 column and inputs in a length=10 column | |
= f.input :field_name, label_html: {class: "col-lg-2 col-md-2"} do | |
.col-lg-10.col-md-10 | |
= f.input_field :field_name, collection: @my_collection, as: :radio_buttons |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment