Changeset 8166
- Timestamp:
- 11/18/07 22:01:33 (1 year ago)
- Files:
-
- trunk/actionmailer/CHANGELOG (modified) (1 diff)
- trunk/actionmailer/test/mail_render_test.rb (modified) (2 diffs)
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_view/base.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionmailer/CHANGELOG
r8114 r8166 1 1 *SVN* 2 3 * Fixed that partials would be broken when using text.plain.erb as the extension #10130 [java] 2 4 3 5 * Update README to use new smtp settings configuration API. Closes #10060 [psq] trunk/actionmailer/test/mail_render_test.rb
r8111 r8166 19 19 recipients recipient 20 20 subject "rendering rxml template" 21 from "tester@example.com" 22 end 23 24 def included_subtemplate(recipient) 25 recipients recipient 26 subject "Including another template in the one being rendered" 21 27 from "tester@example.com" 22 28 end … … 71 77 assert_equal "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<test/>", mail.body.strip 72 78 end 79 80 def test_included_subtemplate 81 mail = RenderMailer.deliver_included_subtemplate(@recipient) 82 assert_equal "Hey Ho, let's go!", mail.body.strip 83 end 73 84 end 74 85 trunk/actionpack/CHANGELOG
r8130 r8166 1 1 *SVN* 2 3 * Fixed that partial rendering should look at the type of the first render to determine its own type if no other clues are available (like when using text.plain.erb as the extension in AM) #10130 [java] 2 4 3 5 * Fixed that has_many :through associations should render as collections too #9051 [mathie/danger] trunk/actionpack/lib/action_view/base.rb
r8134 r8166 288 288 end 289 289 template_file_name = full_template_path(template_path, template_extension) 290 template_extension = template_extension.gsub(/^ \w+\./, '') # strip off any formats290 template_extension = template_extension.gsub(/^.+\./, '') # strip off any formats 291 291 end 292 292 else … … 491 491 # Determines the template's file extension, such as rhtml, rxml, or rjs. 492 492 def find_template_extension_for(template_path) 493 find_template_extension_from_handler(template_path, true) || find_template_extension_from_handler(template_path) 493 find_template_extension_from_handler(template_path, true) || 494 find_template_extension_from_handler(template_path) || 495 find_template_extension_from_first_render() 494 496 end 495 497 … … 512 514 nil 513 515 end 516 517 # Determine the template extension from the <tt>@first_render</tt> filename 518 def find_template_extension_from_first_render 519 extension = @first_render.to_s.sub /^\w+\.?/, '' 520 extension.blank? ? nil : extension 521 end 514 522 515 523 # This method reads a template file.