diff --git a/CHANGELOG.md b/CHANGELOG.md index e2e31c7..3da6767 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ You can find recent releases with docs in GitHub: https://github.com/shivam091/rails_bootstrap_form/releases +## [0.7.0](https://github.com/shivam091/rails_bootstrap_form/compare/v0.6.2...v0.7.0) - 2023-05-24 + +### What's new +- Added helper methods for rendering submit buttons on forms. + ## [0.6.2](https://github.com/shivam091/rails_bootstrap_form/compare/v0.6.1...v0.6.2) - 2023-05-24 ### What's fixed diff --git a/Gemfile.lock b/Gemfile.lock index 3908774..c513e17 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rails_bootstrap_form (0.6.2) + rails_bootstrap_form (0.7.0) actionpack (~> 7.0) activemodel (~> 7.0) diff --git a/demo/app/views/users/_horizontal_form.html.erb b/demo/app/views/users/_horizontal_form.html.erb index eec3dc6..d5b7c36 100644 --- a/demo/app/views/users/_horizontal_form.html.erb +++ b/demo/app/views/users/_horizontal_form.html.erb @@ -24,7 +24,7 @@ <% end %> <%= form.check_box :terms, required: true %>
- <%= form.submit "Register", class: "btn btn-primary" %> + <%= form.primary "Register" %> <%= link_to "Cancel", users_path, class: "btn btn-secondary" %>
<% end %> diff --git a/demo/app/views/users/_vertical_form.html.erb b/demo/app/views/users/_vertical_form.html.erb index 0a736b9..9923a24 100644 --- a/demo/app/views/users/_vertical_form.html.erb +++ b/demo/app/views/users/_vertical_form.html.erb @@ -24,7 +24,7 @@ <% end %> <%= form.check_box :terms, required: true %>
- <%= form.submit "Register", class: "btn btn-primary" %> + <%= form.primary "Register" %> <%= link_to "Cancel", users_path, class: "btn btn-secondary" %>
<% end %> diff --git a/lib/rails_bootstrap_form/bootstrap_form_options.rb b/lib/rails_bootstrap_form/bootstrap_form_options.rb index e5b36f2..4e37a6c 100644 --- a/lib/rails_bootstrap_form/bootstrap_form_options.rb +++ b/lib/rails_bootstrap_form/bootstrap_form_options.rb @@ -119,6 +119,11 @@ class BootstrapFormOptions # The default value is `col-sm-10`. attr_accessor :field_col_wrapper_class + # Option to render submit button using `