bootstrap4_helper 1.2.1 → 1.2.2
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 +4 -4
- data/lib/bootstrap4_helper/page_header.rb +5 -3
- data/lib/bootstrap4_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c35ca44f120427c65ccdf083ee5a0fbf7c39a2457e2e6f37b652afba0d0495fa
|
|
4
|
+
data.tar.gz: 3d793601d6c68ab812508002ff3d1725d3b8e01a33b49304d87f3a351cf796f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 10eacd735ea5520e0096569a6b48d6234bf106d4f7d92d4b85ebcb11389b5d0df61b0b7684fd0641decbb27ff21ba27792eaa158fb730f95bd814d8a5fbbb9d1
|
|
7
|
+
data.tar.gz: 457595afdaee9a6d10db19026332f2cab1b5538fabc24b8fb5633ba7d4a5332a96a8baea97a0a9cd1f0b5daa81738a34211243e400d2efed6775ad56ef5b5273
|
|
@@ -7,6 +7,7 @@ module Bootstrap4Helper
|
|
|
7
7
|
#
|
|
8
8
|
# @param [ActionView] template
|
|
9
9
|
# @param [Hash] opts
|
|
10
|
+
# @option opts [symbol] :type
|
|
10
11
|
# @option opts [String] :id
|
|
11
12
|
# @option opts [String] :class
|
|
12
13
|
# @option opts [Hash] :data
|
|
@@ -14,6 +15,7 @@ module Bootstrap4Helper
|
|
|
14
15
|
def initialize(template, opts = {}, &block)
|
|
15
16
|
super(template)
|
|
16
17
|
|
|
18
|
+
@type = opts.fetch(:type, nil)
|
|
17
19
|
@id = opts.fetch(:id, uuid)
|
|
18
20
|
@class = opts.fetch(:class, '')
|
|
19
21
|
@data = opts.fetch(:data, {})
|
|
@@ -26,10 +28,10 @@ module Bootstrap4Helper
|
|
|
26
28
|
#
|
|
27
29
|
def to_s
|
|
28
30
|
content_tag(
|
|
29
|
-
config(:page_header, :h1),
|
|
30
|
-
id:
|
|
31
|
+
@type || config(:page_header, :h1),
|
|
32
|
+
id: @id,
|
|
31
33
|
class: "pb-2 mt-4 mb-2 border-bottom #{@class}",
|
|
32
|
-
data:
|
|
34
|
+
data: @data
|
|
33
35
|
) do
|
|
34
36
|
@content.call(self)
|
|
35
37
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bootstrap4_helper
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert David
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-07-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|