Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make name optional in FormBuilder#submit #31

Merged
merged 1 commit into from

2 participants

@apacala

This change makes bootstrap_form's submit consistent with Rails' one. That way we can write f.submit and make Rails get the proper submit name from i18n backend.

@apacala apacala Make name optional in FormBuilder#submit
This change makes bootstrap_form's submit consistent with Rails' one. That way we can write `f.submit` and make Rails get the proper submit name from i18n backend.
cfd8c58
@potenza
Owner

Good call. Thanks!

@potenza potenza merged commit 08d8cd6 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 23, 2013
  1. @apacala

    Make name optional in FormBuilder#submit

    apacala authored
    This change makes bootstrap_form's submit consistent with Rails' one. That way we can write `f.submit` and make Rails get the proper submit name from i18n backend.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bootstrap_form/form_builder.rb
View
2  lib/bootstrap_form/form_builder.rb
@@ -76,7 +76,7 @@ def form_group(name = nil, options = {}, &block)
end
end
- def submit(name, options = {})
+ def submit(name = nil, options = {})
options.merge! class: 'btn btn-default' unless options.has_key? :class
super name, options
end
Something went wrong with that request. Please try again.