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: 6fb40b06cd9d72dcf61527d02359b39271963c85617f550553733de463437876
4
- data.tar.gz: 5ec39967bba64ceabba51a32860fcd93bf7b9c3b93c59953deff2224628a44e7
3
+ metadata.gz: 6d872d85445d4c25392456def398ec02e4103b2d200272849c105063c75699e7
4
+ data.tar.gz: a4fa137374414a058fce80a9169518b3978587e968c7a9b21d0a8982db1b86f0
5
5
  SHA512:
6
- metadata.gz: 0c478ff7b5e4405d6a2e02cdafd9fa6b97624de932e66e2d8f018d5929d27ccc4da590bf150ab04fa9e4c20acb65b6720271c1c0267ce253f11f3c4320574c84
7
- data.tar.gz: 10eb5db5f0dd886d65cbede9e99cd27647fb11ad7e9693ffac83c732de6d53824968c4fc3e43e95e34f46d704809460485d44555f1aafb6b9f38d637cd8ac23c
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module TbCore
2
- VERSION = '1.5.0'.freeze
2
+ VERSION = '1.5.1'.freeze
3
3
  end
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
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.0
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: 2019-09-04 00:00:00.000000000 Z
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