Adds the btn-default class selectively to buttons which do not have an explicit button type.
Calls superclass method
# File lib/simple_form/bootstrap/form_builders/button.rb, line 6defbutton(type, *args, &proc)
options = args.extract_options!.dupoptions[:class] = [*options[:class]]
# Add the specified class type.ifoptions[:class].select { |cls|BUTTON_CLASSES.include?(cls) }.empty?iftype.to_s==:submit.to_s.freezeoptions[:class] <<'btn-primary'elseoptions[:class] <<'btn-default'endendargs<<optionssuper(type, *args, &proc)
end
submit_button(*args, &block)click to toggle source
Creates a submit button.
This augments the original button implementation to generate a button element with a submit action when a block is given. Otherwise, it falls back to the original submit helper.