tb_core 1.5.0 → 1.5.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d872d85445d4c25392456def398ec02e4103b2d200272849c105063c75699e7
|
4
|
+
data.tar.gz: a4fa137374414a058fce80a9169518b3978587e968c7a9b21d0a8982db1b86f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7b229ce4e43d1012672432e6641005cc944926eef3a77fe5044cfc26ed591d0d572729ddbd7fb6a7c0ca27e9c559fe8aa05941815abcb2d29281af35637a9d0
|
7
|
+
data.tar.gz: 1939d6ab1f5e361a89b0dc79f3dea4c023413cad9bb870a4f711241cdcb7dd6b8c0474b2a49321e686de3bf64ee86571c6ffb706bf0d736991dd1713de76d4d9
|
@@ -13,6 +13,21 @@ module TbCore::ApplicationHelper
|
|
13
13
|
return form_for(record, options, &block)
|
14
14
|
end
|
15
15
|
|
16
|
+
def tb_form_with(record, **options, &block)
|
17
|
+
options[:builder] = TbCore::FormBuilder
|
18
|
+
|
19
|
+
options[:html] ||= {}
|
20
|
+
if options[:html][:class]
|
21
|
+
options[:html][:class] += ' form-horizontal'
|
22
|
+
else
|
23
|
+
options[:html][:class] = 'form-horizontal'
|
24
|
+
end
|
25
|
+
|
26
|
+
options[:model] = record
|
27
|
+
|
28
|
+
return form_with(options, &block)
|
29
|
+
end
|
30
|
+
|
16
31
|
def tb_form_errors(record, *fields_to_display)
|
17
32
|
if record.errors.any?
|
18
33
|
content_tag :div, class: 'form-errors test' do
|
data/lib/tb_core/form_builder.rb
CHANGED
@@ -219,7 +219,7 @@ class TbCore::FormBuilder < ActionView::Helpers::FormBuilder
|
|
219
219
|
# Builds a file field group
|
220
220
|
#
|
221
221
|
def tb_file_field(attribute, options={})
|
222
|
-
tb_input_field(attribute) do
|
222
|
+
tb_input_field(attribute, nil, options) do
|
223
223
|
file_field(attribute)
|
224
224
|
end
|
225
225
|
end
|
data/lib/tb_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Woods
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: authlogic
|
@@ -464,6 +464,7 @@ files:
|
|
464
464
|
- spec/controllers/tb_core/application_controller_spec.rb
|
465
465
|
- spec/dummy/README.rdoc
|
466
466
|
- spec/dummy/Rakefile
|
467
|
+
- spec/dummy/app/assets/config/manifest.js
|
467
468
|
- spec/dummy/app/assets/javascripts/admin/application.js
|
468
469
|
- spec/dummy/app/assets/javascripts/application.js
|
469
470
|
- spec/dummy/app/assets/stylesheets/admin/application.scss
|
@@ -510,7 +511,7 @@ files:
|
|
510
511
|
homepage: http://bitbucket.org/moser-inc/tb_core
|
511
512
|
licenses: []
|
512
513
|
metadata: {}
|
513
|
-
post_install_message:
|
514
|
+
post_install_message:
|
514
515
|
rdoc_options: []
|
515
516
|
require_paths:
|
516
517
|
- lib
|
@@ -526,13 +527,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
526
527
|
version: '0'
|
527
528
|
requirements: []
|
528
529
|
rubygems_version: 3.0.3
|
529
|
-
signing_key:
|
530
|
+
signing_key:
|
530
531
|
specification_version: 4
|
531
532
|
summary: Twice Baked Core Engine
|
532
533
|
test_files:
|
533
534
|
- spec/spec_helper.rb
|
534
535
|
- spec/dummy/app/controllers/application_controller.rb
|
535
536
|
- spec/dummy/app/views/layouts/application.html.erb
|
537
|
+
- spec/dummy/app/assets/config/manifest.js
|
536
538
|
- spec/dummy/app/assets/javascripts/admin/application.js
|
537
539
|
- spec/dummy/app/assets/javascripts/application.js
|
538
540
|
- spec/dummy/app/assets/stylesheets/application.scss
|