Changeset 4550
- Timestamp:
- 07/05/06 02:38:55 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/layout.rb (modified) (1 diff)
- trunk/actionpack/test/controller/layout_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4546 r4550 1 1 *SVN* 2 3 * Added exception handling of missing layouts #5373 [chris@ozmm.org] 2 4 3 5 * Fixed that real files and symlinks should be treated the same when compiling templates #5438 [zachary@panandscan.com] trunk/actionpack/lib/action_controller/layout.rb
r4346 r4550 237 237 238 238 if apply_layout?(template_with_options, options) && (layout = pick_layout(template_with_options, options, deprecated_layout)) 239 assert_existence_of_template_file(layout) 240 239 241 options = options.merge :layout => false if template_with_options 240 242 logger.info("Rendering #{options} within #{layout}") if logger trunk/actionpack/test/controller/layout_test.rb
r4346 r4550 123 123 end 124 124 end 125 126 127 class SetsNonExistentLayoutFile < LayoutTest 128 layout "nofile.rhtml" 129 end 130 131 class LayoutExceptionRaised < Test::Unit::TestCase 132 def setup 133 @request = ActionController::TestRequest.new 134 @response = ActionController::TestResponse.new 135 end 136 137 def test_exception_raised_when_layout_file_not_found 138 @controller = SetsNonExistentLayoutFile.new 139 get :hello 140 @response.template.class.module_eval { attr_accessor :exception } 141 assert_equal ActionController::MissingTemplate, @response.template.exception.class 142 end 143 end