File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -280,6 +280,10 @@ def _write_layout_method
280
280
<<-RUBY
281
281
lookup_context.find_all("#{ _implied_layout_name } ", #{ prefixes . inspect } ).first || super
282
282
RUBY
283
+ else
284
+ <<-RUBY
285
+ super
286
+ RUBY
283
287
end
284
288
285
289
layout_definition = case _layout
Original file line number Diff line number Diff line change @@ -299,6 +299,18 @@ class ::BadFailLayout < AbstractControllerTests::Layouts::Base
299
299
controller . process ( :index )
300
300
assert_equal "Overwrite Hello index!" , controller . response_body
301
301
end
302
+
303
+ test "layout for anonymous controller" do
304
+ klass = Class . new ( WithString ) do
305
+ def index
306
+ render :text => 'index' , :layout => true
307
+ end
308
+ end
309
+
310
+ controller = klass . new
311
+ controller . process ( :index )
312
+ assert_equal "With String index" , controller . response_body
313
+ end
302
314
end
303
315
end
304
316
end
You can’t perform that action at this time.
0 commit comments