effective_form_inputs 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38949f77670f429369ebe4c42481b723fcb47503
4
- data.tar.gz: f5c617cde65e5e9b64b81cd66a227ed8cd9c0771
3
+ metadata.gz: f1bc6bc4e4dd8b9f47f184c3084520c675b98048
4
+ data.tar.gz: 4622b3fc38c58ebea44de3a4aeb01f92fbe36838
5
5
  SHA512:
6
- metadata.gz: 3c52d5222ab07a362564d1460faba890085682c5c3877a22cd7de4fe87514ad8071ecbffc502189e5f5b42405b9cb36a9181c0c1e9b5c6d41f843f83c286c81e
7
- data.tar.gz: 91e545fa95cabdafe83cdc10d81ed629b14b25bce8f389189964fbd954d710c60980a7eac60c7d24e3cbc3a4b1510553c026e25f65ab7558605e9938468e2d38
6
+ metadata.gz: 5eee846f4cc189d5ff1ea06bd3b991fea50bb75312b4cab43fb4a8696664957656c37fa3de06d6c9aac0a7e70b7da9f7cc84206b5661b309d91f9055cff13431
7
+ data.tar.gz: f914da9f59d83f0ee60f2fc56a4a295b26bbf18698c8c86b91a597824d7b4689120fa1370f0e34d45a6bee4576aceb7c5219e10702e1d8f66a238963b2df5154
@@ -4,4 +4,14 @@ module EffectiveFormInputsHelper
4
4
  raise 'price_to_currency expects an Integer representing the number of cents' unless price.kind_of?(Integer)
5
5
  number_to_currency(price / 100.0)
6
6
  end
7
+
8
+ def simple_form_save(form, label = 'Save', options = {}, &block)
9
+ wrapper_options = { class: 'form-actions' }.merge(options.delete(:wrapper_html) || {})
10
+ options = { class: 'btn btn-primary', data: { disable_with: 'Saving...'} }.merge(options)
11
+
12
+ content_tag(:div, wrapper_options) do
13
+ form.button(:submit, label, options) + (capture(&block) if block_given?)
14
+ end
15
+ end
16
+
7
17
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveFormInputs
2
- VERSION = '1.2.5'.freeze
2
+ VERSION = '1.2.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_form_inputs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2018-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.5.2.3
146
+ rubygems_version: 2.4.5.1
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Collection of Form Inputs