Verify if `boolean_style` is :nested

Checking in the input options and in initialized configuration.
This commit is contained in:
Kassio Borges 2013-11-27 10:29:25 -02:00 committed by Erich Kist
parent 82d91adf93
commit a8716748f8
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ module SimpleForm
rendered_item = yield item, value, text, default_html_options.merge(additional_html_options)
if SimpleForm.boolean_style == :nested
if @options.fetch(:boolean_style, SimpleForm.boolean_style) == :nested
label_options = {}
add_default_name_and_id_for_value(text, label_options)
label_options['for'] = label_options['id']