This project is archived and is in readonly mode.

#2284 ✓resolved
Mateusz Drożdżyński

ActionView::Template doesn't support multipart formats with locale

Reported by Mateusz Drożdżyński | March 18th, 2009 @ 10:43 AM | in 2.x

ActionView::Template seems to parse templates with multipart format and locale incorrectly. That is if you have a file template.en.text.plain.erb it falls back to thinking 'en' is the format.

Here's how it parses a simple template:


#<ActionView::ReloadableTemplate:0x3b84194 @previously_last_modified=Tue Mar 17 12:33:25 +0100 2009, @_memoized_method_segment=["app47views47mailer47activation46en46text46plain46erb"], @format="en", @_memoized_relative_path=["app/views/mailer/activation.en.text.plain.erb"], @extension=nil, @_memoized_method_name_without_locals=["_run_app47views47mailer47activation46en46text46plain46erb"], @load_path="/Users/matid/Projects/***/trunk/app/views", @base_path="mailer", @filename="/Users/matid/Projects/***/trunk/app/views/mailer/activation.en.text.plain.erb", @locale=nil, @name="activation", @template_path="mailer/activation.en.text.plain.erb">

I attach the patch to fix this behaviour. I couldn't figure out where the tests for ActionView::Template are located thus lack of thereof.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages