fix content_for failing to capture the correct block input (#639)

This commit is contained in:
Serdar Dogruyol - Sedo セド 2022-06-27 12:28:13 +03:00 committed by GitHub
parent d53d253620
commit 317d086b4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 9 deletions

View file

@ -1,5 +1,5 @@
Hello <%= name %>
<% content_for "custom" do %>
<h1>Hello from otherside</h1>
<% content_for "meta" do %>
<title>Kemal Spec</title>
<% end %>

View file

@ -1,6 +1,8 @@
<html>
<head>
<%= yield_content "meta" %>
</head>
<body>
<%= content %>
<%= yield_content "custom" %>
</body>
</html>

View file

@ -1,8 +1,10 @@
<html>
<head>
<%= yield_content "meta" %>
</head>
<body>
<%= content %>
<%= yield_content "custom" %>
<%= var1 %>
<%= var2 %>
<%= var1 %>
<%= var2 %>
</body>
</html>