eac_rails_utils 0.29.5 → 0.29.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '093708bd6edc46d01a9f3f2d38178e57faaa713cfbc7784583883b89441ca7c9'
|
|
4
|
+
data.tar.gz: dd74f6899cad1cc50a67e9444d92046ae431263bf7f162c4d5039281c9dc26bd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b9d927bb44ccdd4f5367ae78024dd4c9c612074a7621508d410bc6a05fcc8978090e6b2162b5e9e3254799e651316beadee8f0ad8edb4e8d68de4c4660f1e50
|
|
7
|
+
data.tar.gz: da2a9c75d8424b3c7cf5b05cb0ff4e278fbc295a7e4b6e1f425c29604c12c05012c68e2410796fe2148d8e5315b75e7e74d8af609c948bfdbc280e6bafdf18ee
|
|
@@ -4,18 +4,18 @@ module EacRailsUtils
|
|
|
4
4
|
module CommonFormHelper
|
|
5
5
|
class FormBuilder
|
|
6
6
|
module FieldsFor
|
|
7
|
-
def fields_for(association, &
|
|
7
|
+
def fields_for(association, &)
|
|
8
8
|
fieldset(association) do
|
|
9
|
-
nested_fields(association, &
|
|
9
|
+
nested_fields(association, &) << add_link(association)
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
private
|
|
14
14
|
|
|
15
|
-
def nested_fields(association, &
|
|
15
|
+
def nested_fields(association, &)
|
|
16
16
|
form.nested_fields_for(association) do |nested_form|
|
|
17
17
|
helper.content_tag(:div, class: 'nested_form_row') do
|
|
18
|
-
helper.capture(FormBuilder.new(nested_form, helper), &
|
|
18
|
+
helper.capture(FormBuilder.new(nested_form, helper), &) <<
|
|
19
19
|
remove_link(nested_form)
|
|
20
20
|
end
|
|
21
21
|
end
|
|
@@ -9,14 +9,14 @@ module EacRailsUtils
|
|
|
9
9
|
include ::ActionView::Helpers::FormHelper
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def common_form(model_instance, options = {}, &
|
|
12
|
+
def common_form(model_instance, options = {}, &)
|
|
13
13
|
submit_label = options.delete(:submit_label)
|
|
14
14
|
options[:html] ||= {}
|
|
15
15
|
options[:html][:class] = 'CommonFormHelper'
|
|
16
16
|
form_for(model_instance, options) do |form|
|
|
17
17
|
fb = FormBuilder.new(form, self)
|
|
18
18
|
errors(model_instance) <<
|
|
19
|
-
capture(fb, &
|
|
19
|
+
capture(fb, &) <<
|
|
20
20
|
errors_not_showed(model_instance, fb.field_errors_showed) <<
|
|
21
21
|
form.submit(submit_label, class: 'btn btn-primary')
|
|
22
22
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eac_rails_utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.29.
|
|
4
|
+
version: 0.29.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- E.A.C.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bootstrap-sass
|
|
@@ -138,8 +137,6 @@ dependencies:
|
|
|
138
137
|
- - ">="
|
|
139
138
|
- !ruby/object:Gem::Version
|
|
140
139
|
version: 0.13.1
|
|
141
|
-
description:
|
|
142
|
-
email:
|
|
143
140
|
executables: []
|
|
144
141
|
extensions: []
|
|
145
142
|
extra_rdoc_files: []
|
|
@@ -231,10 +228,8 @@ files:
|
|
|
231
228
|
- lib/eac_rails_utils/rspec/setup/models_utils.rb
|
|
232
229
|
- lib/eac_rails_utils/url_helper.rb
|
|
233
230
|
- lib/eac_rails_utils/version.rb
|
|
234
|
-
homepage:
|
|
235
231
|
licenses: []
|
|
236
232
|
metadata: {}
|
|
237
|
-
post_install_message:
|
|
238
233
|
rdoc_options: []
|
|
239
234
|
require_paths:
|
|
240
235
|
- lib
|
|
@@ -249,8 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
249
244
|
- !ruby/object:Gem::Version
|
|
250
245
|
version: '0'
|
|
251
246
|
requirements: []
|
|
252
|
-
rubygems_version: 3.
|
|
253
|
-
signing_key:
|
|
247
|
+
rubygems_version: 3.6.9
|
|
254
248
|
specification_version: 4
|
|
255
249
|
summary: Código reutilizável para as aplicações Rails da E.A.C..
|
|
256
250
|
test_files: []
|