diff options
author | lest <just.lest@gmail.com> | 2011-12-20 15:37:20 +0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-20 14:24:01 +0100 |
commit | e97aa2c22c189864621bf28d4a5da27a3c0287a4 (patch) | |
tree | 393b233ee917f9bf78cac31e725c601597242db5 /actionpack/test/controller/render_test.rb | |
parent | 2305a98f7a8ffa374a11387bfb0c0c142dcb8aa3 (diff) | |
download | rails-e97aa2c22c189864621bf28d4a5da27a3c0287a4.tar.gz rails-e97aa2c22c189864621bf28d4a5da27a3c0287a4.tar.bz2 rails-e97aa2c22c189864621bf28d4a5da27a3c0287a4.zip |
remove warnings about @variable_for_layout
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index 243bad8749..f42a04d670 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -25,6 +25,8 @@ end class TestController < ActionController::Base protect_from_forgery + before_filter :set_variable_for_layout + class LabellingFormBuilder < ActionView::Helpers::FormBuilder end @@ -364,17 +366,14 @@ class TestController < ActionController::Base end def layout_test_with_different_layout - @variable_for_layout = nil render :action => "hello_world", :layout => "standard" end def layout_test_with_different_layout_and_string_action - @variable_for_layout = nil render "hello_world", :layout => "standard" end def layout_test_with_different_layout_and_symbol_action - @variable_for_layout = nil render :hello_world, :layout => "standard" end @@ -383,7 +382,6 @@ class TestController < ActionController::Base end def layout_overriding_layout - @variable_for_layout = nil render :action => "hello_world", :layout => "standard" end @@ -666,8 +664,11 @@ class TestController < ActionController::Base private + def set_variable_for_layout + @variable_for_layout = nil + end + def determine_layout - @variable_for_layout ||= nil case action_name when "hello_world", "layout_test", "rendering_without_layout", "rendering_nothing_on_layout", "render_text_hello_world", |