Changeset 7181
- Timestamp:
- 07/11/07 23:32:02 (1 year ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/base.rb (modified) (1 diff)
- trunk/actionpack/test/controller/rescue_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r7177 r7181 1 1 *SVN* 2 3 * Make sure missing template exceptions actually say which template they were looking for. Closes #8683 [dasil003] 2 4 3 5 * Fix errors with around_filters which do not yield, restore 1.1 behaviour with after filters. Closes #8891 [skaes] trunk/actionpack/lib/action_controller/base.rb
r7103 r7181 1242 1242 def assert_existence_of_template_file(template_name) 1243 1243 unless template_exists?(template_name) || ignore_missing_templates 1244 full_template_path = template_name.include?('.') ? template_name : @template.full_template_path(template_name, "#{@template.template_format}.erb") 1244 full_template_path = template_name.include?('.') ? template_name : "#{template_name}.#{@template.template_format}.erb" 1245 display_paths = view_paths.join(':') 1245 1246 template_type = (template_name =~ /layouts/i) ? 'layout' : 'template' 1246 raise(MissingTemplate, "Missing #{template_type} #{full_template_path} ")1247 raise(MissingTemplate, "Missing #{template_type} #{full_template_path} in view path #{display_paths}") 1247 1248 end 1248 1249 end trunk/actionpack/test/controller/rescue_test.rb
r6862 r7181 16 16 raise ActionController::NotImplemented.new(:get, :put) 17 17 end 18 19 def missing_template; end 18 20 end 19 21 … … 114 116 assert_response :not_found 115 117 assert_equal ' ', @response.body 118 end 119 120 121 def test_rescue_missing_template_in_public 122 with_rails_root FIXTURE_PUBLIC do 123 with_all_requests_local true do 124 get :missing_template 125 end 126 end 127 128 assert_response :internal_server_error 129 assert @response.body.include?('missing_template'), "Response should include the template name." 116 130 end 117 131