Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
UweKubosch committed Sep 15, 2023
1 parent ac51022 commit e7cb208
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/bootstrap_form/components/validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions lib/bootstrap_form/form_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e7cb208

Please sign in to comment.