render_with_areas 0.2.0 → 0.3.0
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/Gemfile.lock +2 -1
- data/README.md +5 -5
- data/lib/render_with_areas/content_areas.rb +3 -2
- data/lib/render_with_areas/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3dafd0bad80028e844608619520405c7ad32f173b77aa5bc99f949043ec6caa4
|
|
4
|
+
data.tar.gz: 654336d018c37ab4a60e2bd9bcd798593b1651084f44b01e1db26108f6dde348
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1f48260c388b56df9957c054570e183bca51eefc13b214e8a2f6b613a41120d4f4580b7b460997995a7b281dd460f295ae26bc71fffef389a44d4bf7162cc48
|
|
7
|
+
data.tar.gz: 3fe47279f12637392e150b70d089995f9a44fc41fd355c51efc781461a2985a5cddc7f67eaeda4b75e24886461ff7070315f7a4a3674ab31d24f566699593557
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
render_with_areas (0.
|
|
4
|
+
render_with_areas (0.3.0)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -32,6 +32,7 @@ GEM
|
|
|
32
32
|
unicode-display_width (2.4.2)
|
|
33
33
|
|
|
34
34
|
PLATFORMS
|
|
35
|
+
arm64-darwin-24
|
|
35
36
|
x86_64-darwin-21
|
|
36
37
|
|
|
37
38
|
DEPENDENCIES
|
data/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Example:
|
|
|
32
32
|
</header>
|
|
33
33
|
|
|
34
34
|
<main>
|
|
35
|
-
<%=
|
|
35
|
+
<%= yield %>
|
|
36
36
|
</main>
|
|
37
37
|
|
|
38
38
|
<footer class="modal__footer">
|
|
@@ -42,12 +42,12 @@ Example:
|
|
|
42
42
|
|
|
43
43
|
<!-- app/views/posts/show.html.erb -->
|
|
44
44
|
|
|
45
|
-
<%= render_with_areas do |layout| %>
|
|
45
|
+
<%= render_with_areas 'ui/modal' do |layout| %>
|
|
46
46
|
<% layout.with :header do %>
|
|
47
47
|
<h1>Modal Title</h1>
|
|
48
48
|
<% end %>
|
|
49
49
|
|
|
50
|
-
This will
|
|
50
|
+
This will be yielded as default content
|
|
51
51
|
|
|
52
52
|
<% layout.with :footer do %>
|
|
53
53
|
This will show up in the modal footer.
|
|
@@ -56,8 +56,8 @@ Example:
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
<!-- also supports locals, strings -->
|
|
59
|
-
<%= render_with_areas, title: "Modal Title" do |layout| %>
|
|
60
|
-
This will
|
|
59
|
+
<%= render_with_areas 'path/to/partial', title: "Modal Title" do |layout| %>
|
|
60
|
+
This will be yielded as default content
|
|
61
61
|
|
|
62
62
|
<% layout.with :footer, "Footer" %>
|
|
63
63
|
<% end %>
|
|
@@ -7,12 +7,13 @@ module RenderWithAreas
|
|
|
7
7
|
|
|
8
8
|
def render_in(_view_context, &block)
|
|
9
9
|
@view_context = _view_context
|
|
10
|
-
|
|
11
|
-
view_context.render
|
|
10
|
+
captured = view_context.capture(self, &block)
|
|
11
|
+
view_context.render(partial_path, locals) { captured }
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def with(area, content = nil, &block)
|
|
15
15
|
locals[area] = content || view_context.capture(&block)
|
|
16
|
+
nil
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
private
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: render_with_areas
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jens Balvig
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: Easy rendering of partials with multiple content areas
|
|
14
13
|
email:
|
|
@@ -36,7 +35,6 @@ metadata:
|
|
|
36
35
|
homepage_uri: https://github.com/balvig/render_with_areas
|
|
37
36
|
source_code_uri: https://github.com/balvig/render_with_areas
|
|
38
37
|
changelog_uri: https://github.com/balvig/render_with_areas/blob/main/CHANGELOG.md
|
|
39
|
-
post_install_message:
|
|
40
38
|
rdoc_options: []
|
|
41
39
|
require_paths:
|
|
42
40
|
- lib
|
|
@@ -51,8 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
51
49
|
- !ruby/object:Gem::Version
|
|
52
50
|
version: '0'
|
|
53
51
|
requirements: []
|
|
54
|
-
rubygems_version: 3.
|
|
55
|
-
signing_key:
|
|
52
|
+
rubygems_version: 3.7.2
|
|
56
53
|
specification_version: 4
|
|
57
54
|
summary: Easy rendering of partials with multiple content areas
|
|
58
55
|
test_files: []
|