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
280280 <<-RUBY
281281 lookup_context.find_all("#{ _implied_layout_name } ", #{ prefixes . inspect } ).first || super
282282 RUBY
283+ else
284+ <<-RUBY
285+ super
286+ RUBY
283287 end
284288
285289 layout_definition = case _layout
Original file line number Diff line number Diff line change @@ -299,6 +299,18 @@ class ::BadFailLayout < AbstractControllerTests::Layouts::Base
299299 controller . process ( :index )
300300 assert_equal "Overwrite Hello index!" , controller . response_body
301301 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
302314 end
303315 end
304316end
You can’t perform that action at this time.
0 commit comments