From a8716748f8712980caa05ac99c2f67939363b383 Mon Sep 17 00:00:00 2001 From: Kassio Borges Date: Wed, 27 Nov 2013 10:29:25 -0200 Subject: [PATCH] Verify if `boolean_style` is :nested Checking in the input options and in initialized configuration. --- lib/simple_form/tags.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/simple_form/tags.rb b/lib/simple_form/tags.rb index 4eecd35c..33a7db3b 100644 --- a/lib/simple_form/tags.rb +++ b/lib/simple_form/tags.rb @@ -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']