diff --git a/lib/bootstrap_form/components/validation.rb b/lib/bootstrap_form/components/validation.rb index 24f42c14..f0eef6fc 100644 --- a/lib/bootstrap_form/components/validation.rb +++ b/lib/bootstrap_form/components/validation.rb @@ -47,9 +47,7 @@ def presence_validators?(target, object, attribute) end def call_with_self(object, proc) - if proc.is_a? Symbol - proc = object.method(proc) - end + proc = object.method(proc) if proc.is_a? Symbol object.instance_exec(*[(object if proc.arity >= 1)].compact, &proc) end diff --git a/lib/bootstrap_form/form_group.rb b/lib/bootstrap_form/form_group.rb index 7cf1525e..c06a7e9c 100644 --- a/lib/bootstrap_form/form_group.rb +++ b/lib/bootstrap_form/form_group.rb @@ -10,9 +10,8 @@ def form_group(*args, &block) options[:class] = form_group_classes(options) - tag.div(**options.except(:append, :id, :label, :help, :icon, - :input_group_class, :label_col, :control_col, - :add_control_col_class, :layout, :prepend, :floating)) do + tag.div(**options.except(:add_control_col_class, :append, :control_col, :floating, :help, :icon, :id, + :input_group_class, :label, :label_col, :layout, :prepend)) do label = generate_label(options[:id], name, options[:label], options[:label_col], options[:layout]) form_group_content(label, generate_help(name, options[:help]), options, &block) end