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 +4 -4
- data/app/helpers/effective_form_inputs_helper.rb +10 -0
- data/lib/effective_form_inputs/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1bc6bc4e4dd8b9f47f184c3084520c675b98048
|
4
|
+
data.tar.gz: 4622b3fc38c58ebea44de3a4aeb01f92fbe36838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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
|
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.
|
146
|
+
rubygems_version: 2.4.5.1
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Collection of Form Inputs
|