Changeset 2777
- Timestamp:
- 10/28/05 07:33:54 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/layout.rb (modified) (1 diff)
- trunk/actionpack/test/controller/new_render_test.rb (modified) (3 diffs)
- trunk/actionpack/test/fixtures/layouts/standard.rhtml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r2773 r2777 1 1 *SVN* 2 3 * Fix that render :text didn't interpolate instance variables #2629, #2626 [skaes] 2 4 3 5 * Fix line number detection and escape RAILS_ROOT in backtrace Regexp [Nicholas Seckar] trunk/actionpack/lib/action_controller/layout.rb
r2749 r2777 220 220 221 221 erase_render_results 222 add_variables_to_assigns 222 223 @template.instance_variable_set("@content_for_layout", content_for_layout) 223 224 render_text(@template.render_file(layout, true), deprecated_status) trunk/actionpack/test/controller/new_render_test.rb
r2522 r2777 34 34 def render_text_hello_world 35 35 render :text => "hello world" 36 end 37 38 def render_text_hello_world_with_layout 39 @variable_for_layout = ", I'm here!" 40 render :text => "hello world", :layout => true 36 41 end 37 42 … … 170 175 when "hello_world", "layout_test", "rendering_without_layout", 171 176 "rendering_nothing_on_layout", "render_text_hello_world", 177 "render_text_hello_world_with_layout", 172 178 "partial_only", "partial_only_with_layout", 173 179 "accessing_params_in_template", … … 227 233 end 228 234 235 def test_do_with_render_text_and_layout 236 get :render_text_hello_world_with_layout 237 assert_equal "<html>hello world, I'm here!</html>", @response.body 238 end 239 229 240 def test_do_with_render_custom_code 230 241 get :render_custom_code trunk/actionpack/test/fixtures/layouts/standard.rhtml
r4 r2777 1 <html><%= @content_for_layout %>< /html>1 <html><%= @content_for_layout %><%= @variable_for_layout %></html>