i18n_rails_helpers 1.4.5 → 1.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,11 @@
1
+ require 'boot_form_builder'
2
+
1
3
  module BootstrapHelper
4
+ def boot_form_for(object, *args, &block)
5
+ options = args.extract_options!
6
+ simple_form_for(object, *(args << options.merge(builder: BootFormBuilder)), &block)
7
+ end
8
+
2
9
  def boot_page_title(action_or_title = nil, model = nil, &block)
3
10
  if block_given?
4
11
  title = capture(&block)
@@ -0,0 +1,9 @@
1
+ class BootFormBuilder < SimpleForm::FormBuilder
2
+ def buttons(*args, &block)
3
+ @template.content_tag 'div', class: 'form-groups' do
4
+ @template.content_tag 'div', class: ['col-sm-offset-3', 'col-sm-9'] do
5
+ button(:submit, *args, &block)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module I18nRailsHelpers
2
- VERSION = "1.4.5"
2
+ VERSION = "1.4.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_rails_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -30,6 +30,7 @@ files:
30
30
  - app/views/application/show.html.haml
31
31
  - config/locales/de.yml
32
32
  - config/locales/en.yml
33
+ - lib/boot_form_builder.rb
33
34
  - lib/i18n_rails_helpers.rb
34
35
  - lib/i18n_rails_helpers/railtie.rb
35
36
  - lib/i18n_rails_helpers/version.rb