Permalink
Browse files

Fix extending a blank view

Fixes #9
  • Loading branch information...
rwz committed Sep 28, 2013
1 parent 68b9d46 commit 7e8e9dc609faf788632974a2ffe62f1a9bd7dcd8
@@ -89,7 +89,7 @@ def extends(layout, &block)
layout = "layouts/#{layout}" unless layout.include?('/')
# Capture the content to be placed inside the extended layout
- content_for(:layout).replace capture(&block)
+ @view_flow.get(:layout).replace capture(&block)
render :file => layout
end
@@ -78,6 +78,10 @@
assert_select '#some-area', 'extended: two'
assert_select 'h2', 'extended: one'
end
+
+ it 'extends empty layout' do
+ get :extended_three
+ end
end
end
@@ -6,4 +6,8 @@ def extended_one
def extended_two
render :layout => 'extend_two'
end
+
+ def extended_three
+ render :layout => 'extend_one'
+ end
end
@@ -0,0 +1 @@
+<% append :title, 'lol' %>

0 comments on commit 7e8e9dc

Please sign in to comment.